NANY 2012 Entry Information
Application Name | MPH (Media Player Hotkeys) |
Supported OSes | Windows 7. Probably works, but not tested on, Windows XP/Vista/8/10 |
Web Page | Website (http://skwire.dcmembers.com/wb/pages/software/mph.php) |
Download Link | Download (http://skwire.dcmembers.com/apps/mph/MPH.zip) |
Author | Jody Holmes (Skwire Empire) (http://skwire.dcmembers.com) |
Description
MPH (Media Player Hotkeys) is a hotkey application designed to allow you to control various audio, video and media players from one set of global hotkeys.
Features
- Actions: Play, Pause, PlayPause, Stop, Next, Previous, Volume Up, Volume Down, Volume Mute and Show Popup Menu.
- You can set however many hotkeys per action as you would like.
- Extremely flexible hotkey system. You can even use mouse buttons and the mouse wheel.
- Popup menu has configurable icon size: 16, 32, 48, 64 or 128 pixels.
- Currently, 19 applications are fully or partially supported: 1x1 (http://mpesch3.de1.cc/1by1.html), AIMP (http://www.aimp2.us/), AIMP3 (http://www.aimp.ru/), ALPlayer (http://www.altools.com/), ALSong (http://www.altools.com/), Billy (http://www.sheepfriends.com/?page=billy), CoolPlayer (http://coolplayer.sourceforge.net/), Foobar2000 WA (http://www.foobar2000.org), Foobar2000 (http://www.foobar2000.org), KMPlayer (http://www.kmplayer.com), Light Alloy (http://www.light-alloy.ru/en/home/), Media Player Classic (http://mpc-hc.sourceforge.net/), Pandora Desktop App (http://www.pandora.com), PotPlayer (http://www.videohelp.com/tools/PotPlayer), Quintessential Media Player (http://www.quinnware.com), Screamer Radio (http://www.screamer-radio.com/), STP (http://systrayplay.chat.ru/), Spider Player (http://spider-player.com/), Spotify (http://www.spotify.com), Trout (http://skwire.dcmembers.com), VLC (http://www.videolan.org/vlc/), Winamp (http://www.winamp.com), and Windows Media Player (http://windows.microsoft.com/en-US/windows/products/windows-media-player).
Screenshots
[ You are not allowed to view attachments ] [ You are not allowed to view attachments ]
[ You are not allowed to view attachments ] [ You are not allowed to view attachments ]
[ You are not allowed to view attachments ]
Usage
Installation
Download the zip file and extract its contents into a new folder. Run MPH.exe to start the application.
Using the Application
Set some hotkeys and try it.
Uninstallation
Delete the folder you unzipped it to. The application doesn't write to the registry.
Sometimes I have MPH running while no media players are running -- I got to thinking it might be convenient in such a situation for an appropriate player to get started up if one of the configured MPH hotkeys was entered. In my brief testing and scanning of the documentation, I got the impression that this is not how things work currently. Assuming that's correct, how does this idea sound?
Random implementation-related thoughts...
I guess that somehow MPH would need to know or become aware of paths of appropriate starting programs (e.g. if a player is launched via a batch file, the path of that batch file). FWIW, I wouldn't mind specifying such information in an ini file :)
If MPH did have that info, may be upon receiving a hotkey, if it found no players running corresponding to the hotkey, it could start the top-most matching player.
P.S. The suggested global hotkey idea for rewinding has been working ok. Thanks again for the pointer :up:
Update this works with the latest version of Spotify 1.0.6.80.
#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.
;|---------------|
;|--[ SOURCES ]--|
;|---------------|
;Base Spotify Script from: http://www.autohotkey.com/board/topic/36239-spotify-global-hotkeys/
;Base Starring Script from: http://superuser.com/questions/324416/any-spotify-tweaks-with-keyboard-shortcut-to-star-tracks
;|------------------|
;|--[ SETTING UP ]--|
;|------------------|
DetectHiddenWindows, On ;Detect Spotify even if it's minimized
#IfWinExist ahk_class SpotifyMainWindow ;Only do the following if Spotify is running
spotify = ahk_class SpotifyMainWindow ;Set variable for Spotify Window Name
;|---------------|
;|--[ HOTKEYS ]--|
;|---------------|
; "F5" for previous
F5::Media_Prev
; "F6" for next
F6::Media_Next
; "F4" for pause
F4::Media_Play_Pause
; "F10" for track-name
F10::
{
WinGetTitle, spotify_playing, %spotify% ;Get the title of Spotify which contains the track-name
StringTrimLeft, trimmed_playing, spotify_playing, 0 ;Get rid of extra text and place into 'trimmed_playing'
StringReplace, replaced_playing, trimmed_playing, –, -, All ;Replace en dash with normal dash and place into 'replaced_playing'
clipboard = %replaced_playing% ;Copy the fixed text to clipboard
return
}
; "F3" for volume up
F3::
{
ControlSend, ahk_parent, ^{Up}, %spotify%
return
}
; "F2 for volume down
F2::
{
ControlSend, ahk_parent, ^{Down}, %spotify%
return
}
; "F8" for vote up in Radio
F8::
{
;Store active window
MouseGetPos, , , winID
;Left click near the song title in the "Now Playing" box.
WinGetPos, , , , spotifyHeight, %spotify%
clickX := 631
clickY := 556
ControlClick, x%clickX% y%clickY% , %spotify%, , Left, , NA
;Restore original window and mouse position.
WinActivate ahk_id %winID%
return
}
; "F7" for vote down in Radio
F7::
{
;Store active window
MouseGetPos, , , winID
;Left click near the song title in the "Now Playing" box.
WinGetPos, , , , spotifyHeight, %spotify%
clickX := 578
clickY := 577
ControlClick, x%clickX% y%clickY% , %spotify%, , Left, , NA
;Restore original window and mouse position.
WinActivate ahk_id %winID%
return
}
; Add track to Your Music
F9::
{
;Store active window
MouseGetPos, , , winID
;Left click near the song title in the "Now Playing" box.
WinGetPos, , , , spotifyHeight, %spotify%
clickX := 161
clickY := 924
ControlClick, x%clickX% y%clickY% , %spotify%, , Left, , NA
;Restore original window and mouse position.
WinActivate ahk_id %winID%
return
}
;|-----------------|
;|--[ FUNCTIONS ]--|
;|-----------------|
;Context menu helper function.
GetContextMenuItemText(hMenu, nPos)
{
length := DllCall("GetMenuString"
, "UInt", hMenu
, "UInt", nPos
, "UInt", 0 ; NULL
, "Int", 0 ; Get length
, "UInt", 0x0400) ; MF_BYPOSITION
VarSetCapacity(lpString, length + 1)
length := DllCall("GetMenuString"
, "UInt", hMenu
, "UInt", nPos
, "Str", lpString
, "Int", length + 1
, "UInt", 0x0400)
return lpString
}
Volume down/up now directly controls spotify.
I hope you can in corporate the f10 function in your app.
Dislike/like are f9 for songs and f7/f8 for radio both need adjusted to your position of spotify windows and mouse. But it works if set correctly, the user needs to be able to set those in your app tho.
If you do add those, make sure to add a note telling them that next track does not work in radio any more it is different now, you can but than you need to click it to make it work in your app it would be a pain and the script needs to be different. For me it is not needed in Radio.
I hope to see Like/dislike for songs to be supported otherwise I need to run a separate akh script.