godmode Posted June 22, 2006 Share Posted June 22, 2006 hi i been working on a script for gaming to run 3 keystrokes in sequence: ; Script Start - Add your code below here HotKeySet("{PAGE DOWN}", "Terminate") ;Terminate script with PAGE DOWN key send ("{F4}") sleep (100); send ("5") sleep (200); send ("{F1}") Func Terminate () exit return endfunc the problem here is i need to bind this to a hotkey (preferably "{num +}" ) on my keyboard so that i can run it at will but i don't know how do to this. i've tried compiling the script as an executable and using Hot Key Plus 3rd party utility to run it from a hotkey but theres a 3 second delay b4 it runs. i need the script to run instantly. thanks for any help p.s. i know it looks messy : P Link to comment Share on other sites More sharing options...
Valuater Posted June 22, 2006 Share Posted June 22, 2006 Welcome to the forums search "hotkeyset" in the help file at the bottom is a great example 8) Link to comment Share on other sites More sharing options...
AzKay Posted June 22, 2006 Share Posted June 22, 2006 hi i been working on a script for gaming to run 3 keystrokes in sequence: ; Script Start - Add your code below here HotKeySet("{PAGE DOWN}", "Terminate") ;Terminate script with PAGE DOWN key send ("{F4}") sleep (100); send ("5") sleep (200); send ("{F1}") Func Terminate () exit return endfunc the problem here is i need to bind this to a hotkey (preferably "{num +}" ) on my keyboard so that i can run it at will but i don't know how do to this. i've tried compiling the script as an executable and using Hot Key Plus 3rd party utility to run it from a hotkey but theres a 3 second delay b4 it runs. i need the script to run instantly. thanks for any help p.s. i know it looks messy : P HotKeySet("{PAGE DOWN}", "Terminate") ;Terminate script with PAGE DOWN key HotKeySet("", "__Run") While 1 Sleep( 50 ) WEnd Func Terminate () exit return endfunc Func __Run() send ("{F4}") sleep (100); send ("5") sleep (200); send ("{F1}") EndFunc Would that work? I dont know... replace, the hotkey, with whichever you want. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
godmode Posted June 22, 2006 Author Share Posted June 22, 2006 (edited) nope not working Edited June 22, 2006 by godmode Link to comment Share on other sites More sharing options...
AzKay Posted June 22, 2006 Share Posted June 22, 2006 nope not workingHmm, so what exactly were you trying to do again, im abit confused =S # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Ravenlark Posted June 22, 2006 Share Posted June 22, 2006 nope not working I fixed it for you. HotKeySet("{PAGE DOWN}", "Terminate") ;Terminate script with PAGE DOWN key HotKeySet("{NUMPADADD}","TryThis") While 1 Sleep( 50 ) WEnd Func TryThis() send ("{F4}") sleep (100); send ("5") sleep (200); send ("{F1}") EndFunc Func Terminate () exit return endfunc There are three sections. Two separate functions (one to terminate the script, one to do the keypresses) and the While WEnd statement to keep the script running. Ravenlark-----------------------------------------------------when you find yourself with the majority, its time to pause and reflect - Mark Twain Link to comment Share on other sites More sharing options...
godmode Posted June 22, 2006 Author Share Posted June 22, 2006 while in-game id like to hit the 'num +' key (located to the far right) to have it push F4 then 5 then F1 automatically for me, then stop. i need this all to happen in less than 1 second and i need it to happen whenever i push the num + key. Link to comment Share on other sites More sharing options...
godmode Posted June 22, 2006 Author Share Posted June 22, 2006 ah success! thanks Ravenlark its working perfectly now : D Link to comment Share on other sites More sharing options...
Ravenlark Posted June 22, 2006 Share Posted June 22, 2006 (edited) while in-game id like to hit the 'num +' key (located to the far right) to have it push F4 then 5 then F1 automatically for me, then stop. i need this all to happen in less than 1 second and i need it to happen whenever i push the num + key.That is what the script above will do. Once you run the EXE it will run in your taskbar. When you press Num+ it will press the keys you describe with the delays you put in. If you press it again it will do it again.If you need it to run faster, lower the sleep times between keypresses.To terminate the hotkey program, press PageDown.If the hotkey isn't working at all, maybe the game has it bound to something already? Edited June 22, 2006 by Ravenlark Ravenlark-----------------------------------------------------when you find yourself with the majority, its time to pause and reflect - Mark Twain Link to comment Share on other sites More sharing options...
AzKay Posted June 22, 2006 Share Posted June 22, 2006 That is what the script above will do. Once you run the EXE it will run in your taskbar. When you press Num+ it will press the keys you describe with the delays you put in. If you press it again it will do it again.If you need it to run faster, lower the sleep times between keypresses.To terminate the hotkey program, press PageDown.If the hotkey isn't working at all, maybe the game has it bound to something already?Hmm, thats exactly the same code as mine xD, I told him to replace inbetween "" with the key he wanted # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Ravenlark Posted June 22, 2006 Share Posted June 22, 2006 Hmm, thats exactly the same code as mine xD, I told him to replace inbetween "" with the key he wantedYeah, he didn't seem to understand that, so I just filled in the blanks...literally and figuratively. Ravenlark-----------------------------------------------------when you find yourself with the majority, its time to pause and reflect - Mark Twain Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now