Jump to content

Recommended Posts

Posted

I'm trying to execute a Funciton directly after a keypress, like so:

Do
    Sleep(100)
Until "F button is pressed"

Pressing F activates the function. I know its possable, but I couldnt find any command in the help or forum search :)

Posted (edited)

HotKeySet("{F}", "Stop")

Dim $Go

$Go=1
While $Go==1
Sleep(100)
Wend

Func Stop()
$Go=0
Endfunc

While 1
Sleep(1000);Reduces CPU Usage
Wend

Edited by =sinister=
Posted

Ahh, Thanks very much to both of you. I ended up using _Ispressed as it better suited my needs. Ill have to remeber the Beta help book next time.

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
  • Recently Browsing   0 members

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