BitByteBit Posted November 4, 2009 Share Posted November 4, 2009 I don't have a cool keyboard with a button for Next Track etc. However I saw that you can send {Media_Prev} using the send command. Wrote this one real quick. If anyone has any idea as to why it changes the track randomly let me know. Either way I'm happy with this script. expandcollapse popup] #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=..\Documents\WMP.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs Windows Media Player Track Changer Right Windows+< to turn volume down Right Windows+> to turn volume down F7 to turn go back a song F8 to turn go forward a song #ce #Region Includes/Hotkeys #NoTrayIcon #include<misc.au3> Opt("TrayIconDebug", 1) Opt("SendKeyDownDelay",0) HotKeySet("{F8}","Forward") HotKeySet("{F7}","Back") HotKeySet("#,","Down") HotKeySet("#.","Up") #EndRegion ; ; While 1 WEnd Func Back() If WinActive("Windows Media Player") Then Send ("{MEDIA_NEXT}") BlockInput(1) BlockInput(0) Else Send ("{MEDIA_NEXT}") EndIf EndFunc Func Forward() If WinActive("Windows Media Player") Then Send ("{MEDIA_Prev}") BlockInput(1) BlockInput(0) Else Send ("{MEDIA_Prev}") EndIf EndFunc Func Down() If WinActive("Windows Media Player") Then HotKeySet("{F8}") Send("{F8}") HotKeySet("{F8}","Forward") Else Send("{VOLUME_DOWN}{VOLUME_DOWN}") EndIf EndFunc Func Up() If WinActive("Windows Media Player") Then Send("{F9}") else Send("{VOLUME_Up}{VOLUME_Up}") EndIf EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now