2o2 Posted June 28, 2007 Posted June 28, 2007 how do i make a script that will do something if i press the "1" key or if i press the "j" key? i tried while 1 select case (guigetmsg() = "2") filewrite("haha", "sup", 1) endselect wend Rick rack ree, kick 'em in the knee.Rick rack rass, kick 'em in the other knee!
Valuater Posted June 28, 2007 Posted June 28, 2007 see HotKeySet() in help open the example script at the bottom of the page 8)
Leighwyn Posted June 28, 2007 Posted June 28, 2007 how do i make a script that will do something if i press the "1" key or if i press the "j" key? i tried while 1 select case (guigetmsg() = "2") filewrite("haha", "sup", 1) endselect wend Well, the most direct way would be through the use of a hotkey. HotKeySet("1","yourfunction1") Func yourfunction1( ) stuff when you press 1 EndFunc Alternatively, if that isn't what you were looking for, you could use the _IsPressed( ) function. Consult the help file on how to use it. I know for a fact there are threads here on its use for exactly this purpose, because I've read them. So also do a forum search.
2o2 Posted June 28, 2007 Author Posted June 28, 2007 Well, the most direct way would be through the use of a hotkey. HotKeySet("1","yourfunction1") Func yourfunction1( ) stuff when you press 1 EndFunc Alternatively, if that isn't what you were looking for, you could use the _IsPressed( ) function. Consult the help file on how to use it. I know for a fact there are threads here on its use for exactly this purpose, because I've read them. So also do a forum search.oh, i feel like such an idiot!!!! Rick rack ree, kick 'em in the knee.Rick rack rass, kick 'em in the other knee!
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