Jump to content
Sign in to follow this  
unnamed24

tray program w/ hotkey?

Recommended Posts

unnamed24

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!!! ;)

Share this post


Link to post
Share on other sites
Zonarius

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

Share this post


Link to post
Share on other sites
unnamed24

hey thanks! i'm gonna try it... so how can i make it into a tray?

Share this post


Link to post
Share on other sites
unnamed24

oh didnt see that... thanks Zonarius! you really helped! hope you help more people! ;)

i'll tell you if there's any problem...

Edited by unnamed24

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.