Jump to content

Recommended Posts

Posted (edited)

For some reason Windows Media Player does not respond to the first instance of WinClose, even though it is the active window.

WinClose ("Windows Media Player", "")

I have to send two instances of WinClose to close WMP:

WinClose ("Windows Media Player", "")
WinClose ("Windows Media Player", "")

This wouldn't be a problem, but sending two instances causes another issue in WMC, so I need to only send one instance.

I've also tried WinKill, and tried WinActivate too to activate WMP first, but as mentioned WMP is already active!

WinActivate ("Windows Media Player", "")
WinClose ("Windows Media Player", "")

ProcessClose does work the first time but I can't use it for what I'm doing because closing the WMP process cuts the audio link between WMP and WMC resulting in the music stopping and an audio issue message in WMC.

Using the command line "taskkill /im wmplayer.exe" in Command Promt also works the first time but I can't use it for what I'm doing, so I need to use an AutoIt script.

Does anyone have any ideas why it doesn't respond to the first WinClose? This is the only program I have this issue with.

Edited by Keylonta

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...