Jump to content

Keyboard Control


jimmer
 Share

Recommended Posts

HotKeySet("{LEFT}", "fLeft")
HotKeySet("{RIGHT}", "fRight")
HotKeySet("{UP}", "fUp")
HotKeySet("{DOWN}", "fDown")

Func fLeft()
msgbox(0, "title", "left")
endfunc

Func fRight()
msgbox(0, "title", "right")
endfunc

Func fUp()
msgbox(0, "title", "up")
endfunc

Func fDown()
msgbox(0, "title", "down")
endfunc

while(1)
sleep(100)
wend

Run it :idiot:

EDIT: Uhm ....

Edited by Einzeinbleth
Link to comment
Share on other sites

Actually, that is more useful then mine... thanks a lot, by the way, I like the quote... aha

Oh, and how would I repeat this portion of the script, and only this portion of the script?

-Thanks in advanced :idiot:

Edited by jimmer
Link to comment
Share on other sites

[..']

Oh, and how would I repeat this portion of the script, and only this portion of the script?

[..]

<{POST_SNAPBACK}>

For looping, lookup: For..Next, While..Wend, Do..Until in the helpfile.

You may also find it useful to put code, which is repeatedly needed from different places in a script, into a User Defined Function (UDF). And you can also call UDFs from within one of the loop-constructs above.

HTH

:idiot:

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