Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ;
- ; AutoHotkey Version: 1.x
- ; Language: English
- ; Platform: Windows 7
- ; Author: Brian Kamrany
- ;
- ; Script Function: Control iTunes, Windows Media Player, and Winamp easily.
- ;Numpad Subtraction = next
- ;Numpad Multiplication = previous
- ;Numpad Division = pause/unpause
- ;Note: if you want to change the hotkeys to numpad numbers, you must add
- ;both the numpad number and it's alternate key.
- ;For example
- ;Numpad6::
- ;NumpadRight::
- ;(written like that) are both needed if you want to use 6 on the numpad as your hotkey
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- DetectHiddenWindows, on
- NumpadSub::
- if WinExist("ahk_class ITWindow") or WinExist("ahk_class iTunes")
- {
- ControlSend, ahk_parent, ^{RIGHT}
- }
- IfWinExist, ahk_class WMPlayerApp
- {
- SetKeyDelay, 0, 1 ;otherwise doesn't work if currently in WMP window
- ControlSend, ahk_parent, ^{f}
- }
- IfWinExist, ahk_class Winamp v1.x
- ControlSend, ahk_parent, b
- return
- NumpadMult::
- if WinExist("ahk_class ITWindow") or WinExist("ahk_class iTunes")
- {
- ControlSend, ahk_parent, ^{LEFT}
- }
- IfWinExist, ahk_class WMPlayerApp
- {
- SetKeyDelay, 0, 1
- ControlSend, ahk_parent, ^{b}
- }
- IfWinExist, ahk_class Winamp v1.x
- ControlSend, ahk_parent, z
- return
- NumpadDiv::
- if WinExist("ahk_class ITWindow") or WinExist("ahk_class iTunes")
- {
- ControlSend, ahk_parent, ^{SPACE} ;control for better grip, otherwise doesn't work if were filtering songs
- }
- IfWinExist, ahk_class WMPlayerApp
- {
- SetKeyDelay, 0, 1
- ControlSend, ahk_parent, ^{p}
- }
- IfWinExist, ahk_class Winamp v1.x
- ControlSend, ahk_parent, c
- return
Add Comment
Please, Sign In to add comment