Christopher Blue Posted November 7, 2004 Posted November 7, 2004 Recently I have written a script to kill all open instances of AutoIt. However, by doing so, they leave their icons in the system tray until I mouse over them. I was wondering if there is a DLLCall or otherwise that will allow me to force a systray refresh before my "kill" script exits itself?
Christopher Blue Posted November 7, 2004 Author Posted November 7, 2004 I have found some information here. I shall check it out and reply back.
Christopher Blue Posted November 7, 2004 Author Posted November 7, 2004 It seems that I could simply program my script to mouseover the systray and then return to it's previous spot before my script exits but it seems like a half-hearted solution compared telling the system tray itself to refresh.
Administrators Jon Posted November 7, 2004 Administrators Posted November 7, 2004 Try WinClose on the hidden autoit window inside - that should cause Autoit to close nicely.
Christopher Blue Posted November 7, 2004 Author Posted November 7, 2004 How do I find those hidden AutoIt windows? A search for AutoIt3 and AutoIt3.exe both find nothing.
SlimShady Posted November 7, 2004 Posted November 7, 2004 Here's an example you could use. ;Put this in the script you want to shutdown later AutoItWinSetTitle(@ScriptName) ;Use this to shutdown the other script WinClose("filename of the script")
Christopher Blue Posted November 7, 2004 Author Posted November 7, 2004 (edited) Thank you for the tip SlimShady! I have been able to finish my AutoIt Killer script:AutoItKiller.au3:Opt("WinTitleMatchMode", 3) AutoItWinSetTitle("AutoIt Killer"); Give this script a different name so it doesn't kill itself off $window_name = "AutoIt v3" While (WinExists($window_name)) WinClose($window_name) WEndThis works well for the most part but will prove imperfect if I start naming my AutoIt script windows. But I have not had to yet and if I do I shall deal with it on a case-by-case basis.edit: Actually I could just name my AutoIt scripts with a standard prefix like "Christopher Blue's *blah* *blah*". That would allow me to successfully search and close all AU3 windows without losing the ability to differentiate between them for programming purposes. So I spoke too soon I guess...your method rocks SlimShady! Edited November 7, 2004 by Christopher Blue
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