Sign in to follow this  
Followers 0
2o2

button press

4 posts in this topic

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!

Share this post


Link to post
Share on other sites



see HotKeySet() in help

open the example script at the bottom of the page

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
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
Sign in to follow this  
Followers 0