Jump to content



Photo

Previous and Next Track. Volume up and down.


  • Please log in to reply
No replies to this topic

#1 BitByteBit

BitByteBit

    Adventurer

  • Active Members
  • PipPip
  • 133 posts

Posted 04 November 2009 - 07:55 AM

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.


AutoIt         
] #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









0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users