Sly01 Posted November 30, 2023 Posted November 30, 2023 Hi Everyone, We are using AutoIT on an automated system that runs some rendering constantly. If I push and updated of my EXE AutoIT script, I kill the current running one and start the new version. I'm running a Task Schedule to run the script every x amount of time (that keeps running until a new one is started) If I want the script to run for a long time, I might have to kill the process and restart it to reset it's functionality (because it stops interacting with the windows). For any of those situations, for example, the process is stopped and a new one is restarted, There will be a new Tray Icon for every time it has to restart. It's not too much of a problem, but if I have a problem on my server and it has to restart a few times (problem with a file or something causing a bad loop) then my tray gets full and I'm gettin error messages. I don't want to keep the tray icon alive, is this a normal behavior? Or should the icon disappear after a while: I have to open the tray item and move my mouse over the icons for them to disappear.
Developers Jos Posted November 30, 2023 Developers Posted November 30, 2023 Guess you hard killing the running script which will always leave an trayicon untill you hover over it. Build it so you allow it to be closed properly by sending a winclose message to it. 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.
Danp2 Posted November 30, 2023 Posted November 30, 2023 Here are a few older solutions that you may want to check out to see if they still work -- Latest Webdriver UDF Release Webdriver Wiki FAQs
Developers Jos Posted November 30, 2023 Developers Posted November 30, 2023 I actually meant something simple like this: ; Demo killing previous occurences of this script $aList = WinList("This is the running version of my app") For $i = 1 To $aList[0][0] $rc = WinClose($aList[$i][1]) ConsoleWrite('Closing WinHandle:' & $aList[$i][1] & ' rc:' & $rc & ' >Error code: ' & @error & @CRLF) Next AutoItWinSetTitle("This is the running version of my app") While 1 Sleep(100) 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.
Sly01 Posted December 1, 2023 Author Posted December 1, 2023 15 hours ago, Jos said: I actually meant something simple like this: ; Demo killing previous occurences of this script $aList = WinList("This is the running version of my app") For $i = 1 To $aList[0][0] $rc = WinClose($aList[$i][1]) ConsoleWrite('Closing WinHandle:' & $aList[$i][1] & ' rc:' & $rc & ' >Error code: ' & @error & @CRLF) Next AutoItWinSetTitle("This is the running version of my app") While 1 Sleep(100) WEnd OMG This is SICK!!!! This is exactly my kind of solution!!!
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