Jump to content
Sign in to follow this  

Gracefully Closing TrayIcon Program

Recommended Posts


Hello everyone,

I'm trying to close a tray icon program, but sending it a ProcessClose() kills it and the application does not write out the config file that it is supposed to on quit. I've tried sending it a WM_CLOSE with another app, but it can't send it to anything since it doesn't have any windows opened... Does anyone have any idea on how to gracefully close this app? (if anyone wants to know, it's the 1by1.exe mp3 player in tray icon mode)...



Edited by JonathanChan

Share this post

Link to post
Share on other sites

...it doesn't have any windows opened...

run this
$var = WinList()

For $i = 1 To $var[0][0]
    If $var[$i][0] <> "" And Not IsVisible($var[$i][1]) Then
        MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1])

Func IsVisible($handle)
    If BitAND(WinGetState($handle), 2) Then
        Return 1
        Return 0
EndFunc   ;==>IsVisible
...and it will show you the title/handle of windows that you cannot see. The app probably does have a window.


AutoItSetOption("WinTitleMatchMode", 4)


Edited by herewasplato


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.