Jump to content

Recommended Posts

i created two items in the tray menu , lets say they are "function1"  and "pause",  once i clicked on pause function it will get into a pause state waiting for my command , once i manage to get out of the "pause" and directly get into "function1" , then if i try to click on tray item "pause" , it wont work anymore, what is the problem?

Edited by jacky998877
Link to post
Share on other sites
32 minutes ago, jacky998877 said:

what is the problem?

Hard to say without the code ;)

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to post
Share on other sites
Posted (edited)
On 7/16/2022 at 11:49 PM, Musashi said:

Hard to say without the code ;)

the basic code structure is like this :
 
#include <GUIConstants.au3>
#include <AutoItConstants.au3>
#include <TrayConstants.au3>
Opt("TrayMenuMode"3; The default tray menu items will not be shown and items are not checked when selected. These are options 1 and 2 for TrayMenuMode.
Opt("TrayOnEventMode"1; Enable TrayOnEventMode.
 
        TrayCreateItem("exit_the_program--")
        TrayItemSetOnEvent(-1"Exit_the_program")
        
        TrayCreateItem("pause the program")
        TrayItemSetOnEvent(-1"pause")
 
        TrayCreateItem("restart_the_program--")
        TrayItemSetOnEvent(-1"restart_the_program")
        TraySetState($TRAY_ICONSTATE_SHOW; Show the tray menu.
Func Exit_the_program()     
            Exit         
EndFunc
Func pause()
 
EndFunc
Func restart_the_program()     
  
EndFunc
Edited by jacky998877
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...