以下脚本会打开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