I'm using the following script which does not produce errors, but also does not work I'm afraid:
if WinActive("ahk_exe wmplayer.exe") or WinActive("ahk_exe Spotify.exe")
{
Left::Send {RCtrl}{Left}
Right::Send {RCtrl}{Right}
}
The idea is, that pressing a key arrow when WMP (Windows Media Player) has focus, the global shortcut (RCtrl+Arrow) should be triggered, which is defined in PowerToys for Prev/Next Track. The global shortcut works, but not (yet) via Autohotkey...
The console output seems to be correct?
---- M:\Software\Standalone\Apps.ahk
001: if WinActive("ahk_exe wmplayer.exe") || WinActive("ahk_exe Spotify.exe")
006: Exit (14.50)
004: Send,{RCtrl}{Right} (0.03)
004: Return (2.41)