AutoHotKey Scripting

Milkbuster

Active member
Joined
Aug 7, 2013
Messages
35
Reaction score
0
Hey, sorry if this is in the wrong section.
Does anyone know how to script an AutoHotKey Script so that one key will send different functions each time?

For example, say a RP server.
I'd press F5 once and it would shout something like "Hey, hands up!"
Then if I press F5 again, it would say "This is your last chance! Put your hands up!"
So that would be the end of it. If I were to press F5 again, it would be reset and send "Hey, hands up!"

I know this can be done because I've seen it before in a AHK Script but I can't remember where I found it.
There's also a key to reset the script just in case you don't need to use the second output of the key.

Please help me.
 

HayırdırTR

Active member
Joined
Nov 1, 2014
Messages
34
Reaction score
0
As an example to give

F5::
SendInput:: t/s Los Santos Police Department{enter}
sleep 100
SendInput:: t/s Handsup{enter}
return

NUMPAD1::
SendInput:: t/fish{enter}
sleep 15000
SendInput:: t/fish{enter}
return

PROGRAM LÄ°NK; http://download823.mediafire.com/5ggb5yqv8wrg/debqwg1fym1tcp2/AutoHotkey.rar
I know this until  :watchout:
 

Palamantax3

Member
Joined
Mar 22, 2015
Messages
13
Reaction score
0
Code:
~F5::
2send := 1
If(!1send)
{
      SendInput, t/s Hey, Hands up{!}{enter}
      1send := 1
      2send := 0
}else if(!2send){
      SendInput, t/s This is your last chance{!} Put your hands up{!}{enter}
      2send := 1
}else if(1send == 1 && 2send == 1){
      1send := 0
      2send := 0
}

:yesyes:
 
Top