- after idle script ?script script ...?
A typical use of this command (and perhaps the most important one) is when you need to keep a GUI alive during a long calculation. This is often done with the update command, but this slows down your computation and update is no good choice because: Update considered harmful. Instead use something like
after idle [list after 0 $myCommand]where $myCommand does one step of a multi-step calculation and calls the above line after having done the single step until all steps are finished. This will smoothly keep your GUI alive and is no performance hit like update or update idletasks.