如何在正在播放模式下激活WMP

时间:2015-08-24 22:24:19

标签: wmp

以下脚本会打开Windows Media Player,或者在未关闭时激活,点击"最小化" "正在播放"屏幕。我怎样才能永远Winactivate WMP?

    #c::   ;opens WMP
       sc=Windows Media Player  ;- window title
  IfWinExist,%sc%
      {
           IfWinNotActive ,%SC%,
           {
           WinActivate,%SC%
           WinWaitActive,%SC%
           }
           Return
      }
      gosub Launch ; Launch WMP
      Return
        Launch:
        ReLaunch:
        Run, C:\Program Files\Windows Media Player\wmplayer.exe /Task NowPlaying, , , PID
        Winwait, ahk_pid %PID%,,.25
        WinActivate, ahk_pid %PID%
        IfWinNotExist ahk_class WMP Skin Host
            gosub ReLaunch
      Return

0 个答案:

没有答案