SA-MP Forums Archive
AutoHotKey - Wont work. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: AutoHotKey - Wont work. (/showthread.php?tid=448965)



AutoHotKey - Wont work. - faff - 06.07.2013

Hello, Im using Autohotkey.
I want my script to press ''O'' every 5 seconds.
This is the script..

Код:
Numpad5::
Loop {
Send, {O}{enter}

Sleep, 5000

}
Problem, When im testing this in notepad, It works.
But i wont work in sa-mp. Anybody knows why it wont work so?


Re: AutoHotKey - Wont work. - Ronaldo_raul™ - 06.07.2013

Код:
Numpad5::
Loop {
Send, tO{enter}

Sleep, 5000

}
P.S - Not Tested


Re: AutoHotKey - Wont work. - Pizzy - 06.07.2013

Run autohotkey as an administrator. (or the script itself).


Re: AutoHotKey - Wont work. - DuelZ - 06.07.2013

Do you have #Ifwinactive GTA:SA:MP added?

Or,

Numpad5::
Loop
{
Send, O
Sleep, 5000
}

If you want it for chat, replace send with sendinput, tO{Enter}

P.S use scite4autohotkey for better AHK scripting


Re: AutoHotKey - Wont work. - faff - 06.07.2013

Lol, I know how to use it for chat etc... But, @IfWinActive.. wont work..