PDA

View Full Version : lua code for a short delay



benbell
May 3rd, 2008, 11:07 PM
Could someone please let me know how to introduce a short delay (250ms) inbetween two commands in lua? I know it's simple but all I could find in the manual was CreateTimer, which seems a little complex for what I want.

Thanks,

Ben

blubberhoofd
May 4th, 2008, 08:56 AM
hi,

try:


win.Sleep(250)

that should do it ;)

quixote
May 5th, 2008, 12:35 AM
blubberhoofd has it right, but you should know that using that method will block everything for the delay that you specify, I think. Another way would be to create two scripting actions, one in a macro with a simple timer (in the action tree under miscellaneous in the expert view), with the timer pointing to your second script "on timer".