Jump to content

tray program w/ hotkey?


Recommended Posts

hey everyone... it's my first time here... i found out that autoitscript does really cool stuff and somehow if your IQ isnt that of a retard you can learn it easily... and i'm not a retard :D anyways... can anyone help me? i want my program to be just a tray program and when i press a certain hotkey the program executes and when i press another hotkey it stops... need it very badly... thanks for thos who'll help!!! ;)

Link to comment
Share on other sites

I guess the program runs in a loop when the hotkey is pressed?

If so, try this:

Dim $running = false

HotKeySet("g", "go")
HotKeySet("s", "stop")

While True
   If $running Then
     ;your code
   Else
      Sleep(1)
   EndIf
Wend

Func go()
   $running = True
EndFunc

Func stop()
   $running = False
EndFunc
Edited by Zonarius
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...