Hello guys
I would like to be able to change songs on spotify using shourtcuts on my keyboard due to the fact i don't own a keyboard with extra keys providing this feature.
Therefor I've made a script binding my keys to make this possible, but i have a few issues and I think there is a easier or better way of creating this script. I hope someone can have a look and tell me what i could improve.
Some of the issues are:
I have to wait a little time before i will be able to change song right after i just changed. (I can't spam ALT + Right)
Doesn't work when im inside a game. This is actually a big issue for me.
My current code which works:
HotKeySet("!{left}", "Previous")
HotKeySet("!{right}","naeste")
HotKeySet("!{down}","current")
HotKeySet("{DEL}","quit")
While 1
Sleep(100)
WEnd
Func naeste()
Sleep(400)
ControlSend("Spotify", "", "", "^{right}")
EndFunc
Func Previous()
Sleep(400)
ControlSend("Spotify", "", "", "^{left}")
EndFunc
Func Current()
Local $song = WinGetTitle("Spotify", "")
TrayTip("", $song, 1)
EndFunc
Func quit()
Exit 0
EndFunc
- AliOzturk