bobheart Posted May 31, 2004 Share Posted May 31, 2004 I want to have the program(autoit) sit in the system tray and wait if an exe opens then close it right away . but I can't get it to stay in the system tray it just closes . Link to comment Share on other sites More sharing options...
Developers Jos Posted May 31, 2004 Developers Share Posted May 31, 2004 (edited) What code do you have that doesn't work ? Edited May 31, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bobheart Posted May 31, 2004 Author Share Posted May 31, 2004 (edited) ;Generated with AutoBuilder 0.3 Opt("GUICoordMode", 1) Opt("GUINotifyMode", 1) GuiCreate("MyGUI", 392,272,10,10,0x04CF0000) $label_1 = GUISetControl("label", "Leave running to stop program", 30,40, 170,30) GuiShow() While 1 sleep(100) $msg = GuiMsg(0) Select Case $msg = -3 Exit Case $msg = $label_1 ProcessClose("iexplore.exe") ;;; EndSelect WEnd Exit ~~~~~~~~~~~ That was the 2 one i tried this was the 1 one I tried ProcessClose("C:\Program Files\Internet Explorer\iexplore.exe") Edited May 31, 2004 by bobheart Link to comment Share on other sites More sharing options...
Developers Jos Posted May 31, 2004 Developers Share Posted May 31, 2004 If you want it to sit "forever" in the systemtray just killing ieexplorer then this should work: While 1 If ProcessExists("iexplore.exe") then ProcessClose("iexplore.exe") Wend SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bobheart Posted May 31, 2004 Author Share Posted May 31, 2004 Thanks .. Link to comment Share on other sites More sharing options...
tutor2000 Posted May 31, 2004 Share Posted May 31, 2004 If you want it to sit "forever" in the systemtray just killing ieexplorer then this should work: While 1 If ProcessExists("iexplore.exe") then ProcessClose("iexplore.exe") Wendif you add ProcessWait ( "process" [, timeout] ) to that in the loop it will cut cpu usage. I wouldn't even use the timeout Rick 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