Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Adding time delay


  • Please log in to reply
1 reply to this topic
veedanya
  • Members
  • 1 posts
  • Last active: Feb 09 2008 08:01 PM
  • Joined: 09 Feb 2008
I have a working script that presses F1-F8 whenever I activate it with the F9 key. However, I want to add a 2.5 second delay between each of the [F1-F8] keys being pressed. I'm a newbie to scripting, and I'm not sure how to insert the time delay properly; I tried adding "SetKeyDelay, 2500, 0" just under the first line, but that just disables the script. Can anyone help?

The script without any time delay is attached below.


F9::
Loop, 8
{
   Send, {RAlt, F%A_Index%}
   }
Return


VxE
  • Moderators
  • 3622 posts
  • Last active: Dec 24 2015 02:21 AM
  • Joined: 07 Oct 2006
F9::

Loop, 8

{

   Send {RAlt down}{F%A_Index%}{ralt up}

   Sleep 2470 ; ms

}

Return