Jump to content


Need some help with a script


  • Please log in to reply
3 replies to this topic

#1 lejimbob

lejimbob
  • Guests

Posted 08 July 2012 - 07:37 PM

Im pretty new to AutoHotKey

Hotkey, F2, Pause

F1::
loop
{
Send, q
;Sleep, 100
Send, w
;Sleep, 100
Send, e
;Sleep, 100
}

Pause:
pause
return


What I want it to do is start when I press F1, pause when I press F2.

When the script starts it presses Q W E with a loop.

thanks in advance :)

#2 jerbo

jerbo
  • Members
  • 7 posts

Posted 08 July 2012 - 09:20 PM

What you need to do is break out of the loop. One way would be to check when the F2 key is pressed.

F1::	
pause off   ; Make sure to un pause when F1 is pressed (again)
loop
{
Send, q
;Sleep, 100
Send, w
;Sleep, 100
Send, e
;Sleep, 100

GetKeyState, state1, F2, P
if state1 = D
   break
}
return


F2:
pause
return

Also just use pressing the F2 as your pause (no need to make a Hotkey)

#3 bala23783

bala23783
  • Members
  • 1 posts

Posted 11 July 2012 - 05:18 PM

I am new to auto hot scripting.

Test Steps to automate:
1. start a Study.Press 2D button.
2. Press Color.


HOW TO AUTOMATE?

#4 MasterFocus

MasterFocus
  • Moderators
  • 4132 posts

Posted 11 July 2012 - 09:09 PM

I am new to auto hot scripting.

Test Steps to automate:
1. start a Study.Press 2D button.
2. Press Color.


HOW TO AUTOMATE?

Here: <!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=1&t=4986">viewtopic.php?f=1&t=4986</a><!-- l -->