Jump to content

help with the hotkeys


Recommended Posts

hi, i'm having some troubles that i hope u can help me with.

lets say i want to do a script that when you'll press on a key..lets say "4" and when you press that key it makes this command:

Send("words")

after some time i wasn't scripting i simply forgot how to do that(i was and still am a begginer)

thanks :P

Link to comment
Share on other sites

hi, i'm having some troubles that i hope u can help me with.

lets say i want to do a script that when you'll press on a key..lets say "4" and when you press that key it makes this command:

Send("words")

after some time i wasn't scripting i simply forgot how to do that(i was and still am a begginer)

thanks :P

Try this:

HotKeySet("4", "SendKeysFunction")


Do  
    Sleep(100)  
Until False


Func SendKeysFunction()
    
    Send("Words!", 1)
    
EndFunc
Link to comment
Share on other sites

hi, i'm having some troubles that i hope u can help me with.

lets say i want to do a script that when you'll press on a key..lets say "4" and when you press that key it makes this command:

Send("words")

after some time i wasn't scripting i simply forgot how to do that(i was and still am a begginer)

thanks :P

The HotKeySet() command sets a key to call a function when pressed. For that to happen, you need to A) Define a function and B| Set a key to call that function.

I like having my script exit after the function is called, but if you don't want to do that, just remove anything that says "$sent = 0" or "$sent = 1".

EX:

$sent = 0
Func Sendwords()
Send("words")
$sent = 1
EndFunc
HotKeySet("4","Sendwords")

While $sent = 0
Sleep(100)
Wend
Edited by Overkill
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...