0

I use the following script, but unfortunately it doesn't lead to the desired outcome:

#If WinExist("ahk_exe Microsoft.Media.Player.exe")
Send ^m

1 Answer 1

1

SetTimer_Example #2:

#Requires AutoHotkey v2.0

Persistent
SetTimer MediaPlayer_MiniMode, 500

MediaPlayer_MiniMode()
{
    if not WinExist("ahk_exe Microsoft.Media.Player.exe")
        return  ; do nothing
    ; Otherwise:
    SetTimer , 0  ; i.e. the timer turns itself off here.
    WinActivate "ahk_exe Microsoft.Media.Player.exe"
    If WinWaitActive("ahk_exe Microsoft.Media.Player.exe", , 5)
      Send "^m"
    WinWaitClose "ahk_exe Microsoft.Media.Player.exe"
    SetTimer , 500  ; turns the timer on
}

For AHK v1 see here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.