NicoTn Posted February 25, 2007 Posted February 25, 2007 Is there any function or dllcall that can minimize to tray? thanks ~ Strike while 1 If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe") wend [size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size]
xcal Posted February 25, 2007 Posted February 25, 2007 Just hide your GUI and show a tray icon, if one isn't already there. How To Ask Questions The Smart Way
NicoTn Posted February 25, 2007 Author Posted February 25, 2007 Just hide your GUI and show a tray icon, if one isn't already there.i will try while 1 If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe") wend [size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size]
MHz Posted February 25, 2007 Posted February 25, 2007 (edited) To hide and restore your Gui then you are going to need to use the Tray*() functions. Edited February 25, 2007 by MHz
xcal Posted February 25, 2007 Posted February 25, 2007 i will tryIf you can't figure it out, just post the code giving you problems. How To Ask Questions The Smart Way
Moderators SmOke_N Posted February 25, 2007 Moderators Posted February 25, 2007 (edited) How bored am I... this is sad: Anyway... dig your way through this... I've shown something similar before, as well as Zedna I believe... anyway, I don't think before I took the approach you see here... so here is another way:#NoTrayIcon Global $bMinToTray Opt('TrayAutoPause',0) Opt('TrayMenuMode', 1) $hMyGUI = GUICreate('Example Min To Tray', 200, 50) GUISetState() $hMax = TrayCreateItem('Restore GUI') TraySetState() While 1 Switch $bMinToTray Case False Switch GUIGetMsg() Case -3 Exit Case -4 $bMinToTray = Not $bMinToTray WinSetState($hMyGUI, '', @SW_HIDE) Opt('TrayIconHide', 0) EndSwitch Case True Switch TrayGetMsg() Case $hMax $bMinToTray = Not $bMinToTray Opt('TrayIconHide', 1) WinSetState($hMyGUI, '', @SW_RESTORE) WinSetState($hMyGUI, '', @SW_SHOW) EndSwitch EndSwitch WEnd Edited February 25, 2007 by SmOke_N 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 February 25, 2007 Posted February 25, 2007 That's a pretty cool way to do that. Think you want to remove TraySetState(), though. How To Ask Questions The Smart Way
Moderators SmOke_N Posted February 25, 2007 Moderators Posted February 25, 2007 That's a pretty cool way to do that. Think you want to remove TraySetState(), though.Yeah, makes no sense there... I originally made it an option ... then hacked it up for the result you see above. 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.
star2 Posted June 13, 2007 Posted June 13, 2007 How bored am I... this is sad:Anyway... dig your way through this... I've shown something similar before, as well as Zedna I believe... anyway, I don't think before I took the approach you see here... so here is another waythank u I was trying to do that on my own [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]
Valuater Posted June 13, 2007 Posted June 13, 2007 http://www.autoitscript.com/forum/index.ph...ighlite=to+tray8)
ChrisL Posted June 13, 2007 Posted June 13, 2007 I put one of these in the example scripts forum ages ago too http://www.autoitscript.com/forum/index.php?showtopic=26581 back in the day when it was called Scripts and scraps! [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
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