jacky998877 Posted July 17, 2022 Share Posted July 17, 2022 (edited) 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 July 17, 2022 by jacky998877 Link to comment Share on other sites More sharing options...
Musashi Posted July 17, 2022 Share Posted July 17, 2022 32 minutes ago, jacky998877 said: what is the problem? Hard to say without the code "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 comment Share on other sites More sharing options...
jacky998877 Posted July 17, 2022 Author Share Posted July 17, 2022 (edited) see the code below Edited July 17, 2022 by jacky998877 Link to comment Share on other sites More sharing options...
jacky998877 Posted July 17, 2022 Author Share Posted July 17, 2022 (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 July 17, 2022 by jacky998877 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now