Assume I want f12 to toggle on/off of my script, how would I do that?
How to toggle script on/off with a key?
Started by
PureIce
, Nov 16 2010 12:18 AM
21 replies to this topic
#1
-
Posted 16 November 2010 - 12:18 AM
f12:: Pause Suspend return
Suspend,Toggle
#4
-
Posted 16 November 2010 - 11:54 AM
Thanks, this is much simpler and cleanf12:: Pause Suspend returnSuspend,Toggle
#5
-
Posted 24 February 2011 - 07:46 AM
How do you get it to suspend all active scripts?
hopefully there's a better way than writing the function in all of them.
hopefully there's a better way than writing the function in all of them.
#6
-
Posted 24 February 2011 - 01:24 PM
AHKPanic() is a function that can suspend all active scripts.
#7
-
Posted 24 February 2011 - 06:46 PM
If I am running this script for a game because there are no macros yet, would this work?
f12::
Pause
Suspend
return
Q::
Send Numpad0
Send Numpad1
Send Numpad2
Send Numpad3
Send Numpad4
Basically I am trying to send 5 commands, in a certain order, to the keyboard so they all proc within .00001 seconds of each other when I press Q. I want to use f12 to turn it on or off
Something similar to Q::wasd , but with numpad
I am at work so I cannot test it, yet. Thank you
f12::
Pause
Suspend
return
Q::
Send Numpad0
Send Numpad1
Send Numpad2
Send Numpad3
Send Numpad4
Basically I am trying to send 5 commands, in a certain order, to the keyboard so they all proc within .00001 seconds of each other when I press Q. I want to use f12 to turn it on or off
Something similar to Q::wasd , but with numpad
I am at work so I cannot test it, yet. Thank you
#8
-
Posted 13 January 2012 - 10:48 PM
when i do this the script wil pause and all but my script itself doesnt do a thing anymore
#9
-
Posted 02 February 2012 - 02:29 PM
when i do this the script wil pause and all but my script itself doesnt do a thing anymore
I don't understand exactly what you said there.
But maybe the "doesn't do a thing anymore" is because you are sending text, and not buttons.
Q:: Send {Numpad0} Send {Numpad1} Send {Numpad2} Send {Numpad3} Send {Numpad4} return
If that wasn't your problem, please explain a little more
Edit: Or maybe you are just looking for this:
f12:: Hotkey, q, toggle return Q:: Send {Numpad0} Send {Numpad1} Send {Numpad2} Send {Numpad3} Send {Numpad4} return
#10
-
Posted 02 February 2012 - 02:34 PM
All in all is all we are ~
im trying to make something that can pres the Z all the time with a toggle on or off becuz i need to type sometimes
i got this
F1::pause,toggle
Send {z}
im new XD
i got this
F1::pause,toggle
Send {z}
im new XD
#11
-
Posted 02 February 2012 - 02:41 PM
im trying to make something that can pres the Z all the time with a toggle on or off becuz i need to type sometimes
i got this
F1::pause,toggle
Send {z}
im new XD
Oh, you should use Loop. That makes some piece of code repeats itself X times.
F1::pause, toggle F2:: Loop, { Send z ; {} not needed Sleep, 1 ;Need some delay to take the pause } return
Try that.
#12
-
Posted 02 February 2012 - 03:05 PM
All in all is all we are ~
im trying to make something that can pres the Z all the time with a toggle on or off becuz i need to type sometimes
i got this
F1::pause,toggle
Send {z}
im new XD
Oh, you should use Loop. That makes some piece of code repeats itself X times.F1::pause, toggle F2:: Loop, { Send z ; {} not needed Sleep, 1 ;Need some delay to take the pause } return
Try that.
thx wil try
#13
-
Posted 02 February 2012 - 04:14 PM
F1::pause, toggle
F2:: (why u have F2 here?)
Loop,
{
Send z ; {} not needed
Sleep, 1 ;Need some delay to take the pause
}
return
(and wil it pres z or presses z because it need to hold teh button z in
F2:: (why u have F2 here?)
Loop,
{
Send z ; {} not needed
Sleep, 1 ;Need some delay to take the pause
}
return
(and wil it pres z or presses z because it need to hold teh button z in
#14
-
Posted 02 February 2012 - 04:24 PM
janopn do you know how to make a script that keeps the Z pressed not pressing like a miljon times but just keeps it pressed in
#15
-
Posted 02 February 2012 - 04:43 PM