Tukata Posted October 28, 2006 Posted October 28, 2006 Hi, I tried to do it myself but failed. I want my app to start in Tray and appear on click on icon (left or right click). And I need a button to send it back to tray. Thank you Tuk
Moderators SmOke_N Posted October 28, 2006 Moderators Posted October 28, 2006 Hi,I tried to do it myself but failed. I want my app to start in Tray and appear on click on icon (left or right click). And I need a button to send it back to tray.Thank youTukSo... where is what you tried?Did you try:TrayCreateItem, TrayCreateMenu, Opt('TrayMenuMode'1,2,4,8) orTrayGetMsg() or Opt('TrayOnEventMode', 1)? If you did, show us what you've done. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
xcal Posted October 28, 2006 Posted October 28, 2006 Don't forget TraySetOnEvent(). How To Ask Questions The Smart Way
Tukata Posted October 28, 2006 Author Posted October 28, 2006 (edited) Thank you. Here is my script. Where I wrote "Show app window" I want to show the window. And the window should be hidden On Start. The Button will hide the window again. #Include <Constants.au3> #NoTrayIcon GUICreate("Caption", 430, 250) $Button = GUICtrlCreateButton ( "Send to Tray", 10, 10) GUISetState () Opt("TrayMenuMode",1) $Show= TrayCreateItem("Show") TrayCreateItem("") $about = TrayCreateItem("About") TrayCreateItem("") $exit = TrayCreateItem("Exit") TrayCreateItem("") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $Show ;; Show app window Case $msg = $about Msgbox(64,"About:","AutoIt3") Case $msg = $exit ExitLoop EndSelect WEnd Exit Edited October 28, 2006 by Tukata
AzKay Posted October 28, 2006 Posted October 28, 2006 Show which window? # MY LOVE FOR YOU... IS LIKE A TRUCK- #
AzKay Posted October 28, 2006 Posted October 28, 2006 (edited) #Include <Constants.au3> #NoTrayIcon Opt("TrayMenuMode", 1) GUICreate("Caption", 430, 250) $Button = GUICtrlCreateButton ( "Send to Tray", 10, 10) GUISetState (@SW_HIDE) $Show= TrayCreateItem("Show") TrayCreateItem("") $about = TrayCreateItem("About") TrayCreateItem("") $exit = TrayCreateItem("Exit") TrayCreateItem("") TraySetState() While 1 $msg = TrayGetMsg() $xmsg = GUIGetMsg() Select Case $xmsg = $Button WinSetState("Caption", "", @SW_HIDE) Case $msg = $Show WinSetState("Caption", "", @SW_SHOW) Case $msg = $about Msgbox(64,"about:","AutoIt3") Case $msg = $exit ExitLoop EndSelect WEnd Exit Edited October 28, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- #
Tukata Posted October 28, 2006 Author Posted October 28, 2006 (edited) AzKay Thanks a lot. Now it works fine. Now how I can make it run on startup ? On and Off ? Thank you Tuk Edited October 28, 2006 by Tukata
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