Jump to content

Triggering Autoit3 from it's own taskbar icon?


Go to solution Solved by Danyfirex,

Recommended Posts

Posted

I have a simple app that fetches some internet info, puts up a brief msgbox, then sleeps for an hour.  I'd like to trigger the app by somehow clicking on the system area icon at intermediate times.  Am I just using the wrong search terms, or is this difficult?  I don't want to have a GUI taking up screen space all the time.

  • Solution
Posted

You can do it like this:

#include <TrayConstants.au3>



Opt("TrayMenuMode", 3)
Opt("TrayOnEventMode", 1)
HotKeySet("{ESC}", "_Exit")
TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, "_TrayEventClick")
While Sleep(30)

WEnd


Func _Exit()
    Exit
EndFunc   ;==>_Exit


Func _TrayEventClick()
    MsgBox(0,"","Tray Icon Clicked :-)")
EndFunc   ;==>_TrayEventClicked

 

 

Saludos

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