I want to additionally send CTRL+RIGHT when I press RIGHT in case the Windows Media Player is currently in focus. What I achieved so far is that it works in case the WMP is running. How can I change the script such that it only reacts when the WMP window is currently in focus?
SetTimer, KeepRunning
return
KeepRunning:
ifWinActive, "Windows Media Player"
{
Right::Send ^{Right}{Right}
}
return
PS: I'm a total newbie regarding AutoHotkey, so any other code suggestions are welcomed :)
Have a look at #If to create context-sensitive hotkeys and hotstrings.
#Persistent
#If winactive("Windows Media Player")
Right::Send ^{Right}{Right}
#If