Queue-cmd
Delay the execution of the script.
queue {script}
Place the script at the end of the current window message queue. Execution begins when the current window finishes redrawing.
Syntax: queue -p
Execute OnIdle
Syntax: queue -ps
Execute OnIdle, command is substituted with current context first.
Example 1
Prepare two workbooks, Book1 and Book2. Make Book2 active, then execute the following script:
queue -p "ty %H;"; win -a Book1; ty "Hello"; // dumps "Hello Book1" // Substitue "queue -ps" in the 1st line, to dump "Hello Book2"