Command Wait
Parameters Number of seconds to wait.


Wait 0.5
Wait 5

Notes The wait command causes a delay of the number of seconds before the next command is executed.

'---------First, open Notepad

Open "%windir%\system32\notepad.exe"

Wait 1                       'This allows time for Notepad to load
Mouse 21,37 W
Click                         ' Clicks Notepad's File menu
Mouse 81,83 W
Click                          ' Clicks the Open item on Notepad's file menu