Jump to content

newbie in need of help : P


Recommended Posts

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

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

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

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

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 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

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

Hmm, thats exactly the same code as mine xD, I told him to replace inbetween "" with the key he wanted

Yeah, 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...