crimsonnight Posted November 12, 2024 Posted November 12, 2024 Hey guys, I'm looking to close multiple windows (not kill any processes) depending on whether my laptop is connected to my NAS or not. I've tried 2 different approaches, but neither work: if WinExists("Razer Synapse") Then WinClose("Razer Synapse", "MSI Afterburner") ElseIf WinExists("AEC (ASUSTOR EZ Connect)") Then WinClose("AEC (ASUSTOR EZ Connect)") EndIf if WinExists("Razer Synapse") Then WinClose("Razer Synapse") WinClose("MSI Afterburner") ElseIf WinExists("AEC (ASUSTOR EZ Connect)") Then WinClose("AEC (ASUSTOR EZ Connect)") EndIf What am I doing wrong?
ioa747 Posted November 12, 2024 Posted November 12, 2024 (edited) put some Console Write as a check point, to see if it finds the windows If WinExists("Razer Synapse") Then ConsoleWrite("WinExists: Razer Synapse" & @CRLF) WinClose("Razer Synapse") WinClose("MSI Afterburner") EndIf If WinExists("AEC (ASUSTOR EZ Connect)") Then ConsoleWrite("WinExists: AEC (ASUSTOR EZ Connect)" & @CRLF) WinClose("AEC (ASUSTOR EZ Connect)") EndIf to forum how-to-post-code-on-the-forum Edited November 12, 2024 by ioa747 I know that I know nothing
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