ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > N.A.N.Y. 2012

NANY 2012 Release: MPH (Media Player Hotkeys)

<< < (8/13) > >>

captain1701:
Okay, I found the cause but no idea why.

If I change Win+Ctrl+... to Win+Shift+... it works. Looks like at work there is a program using Win+Ctrl combos installed. But only some because Win+Ctrl+F1 for play/pause is working.  ;)

Thanks for the help.

skwire:
Okay, I found the cause but no idea why.

If I change Win+Ctrl+... to Win+Shift+... it works. Looks like at work there is a program using Win+Ctrl combos installed. But only some because Win+Ctrl+F1 for play/pause is working.  ;)

Thanks for the help.-captain1701 (February 27, 2015, 05:39 AM)
--- End quote ---

You're welcome.  Good luck!   :)

uniuse:
I use this one:
http://mplayer-ww.com/eng/-Rockets (October 29, 2012, 07:52 AM)
--- End quote ---

I did try to get that one to work in the past but was unable to.  This is a common problem with "front-end" type of players such as this one.  SMPlayer and MPUI are two other mplayer front-ends that I haven't been able to get to work.  The problem is exacerbated when those front-ends use custom skins instead of regular controls.

Now, that being said, if you have some AutoHotkey code that you happen to use that DOES control mplayer-WW, I'd be happy to test it out and add the support to MPH.
-skwire (October 29, 2012, 01:17 PM)
--- End quote ---

I also use SMPlayer because it has the option to remember track position for music files and across sessions. So it always starts where it left of.

I wanted to use MPH but I read SMPlayer is not supported.

Can I ask if you can update Trout to not only remember when you close the app but across files so I can use it with MPH ?

Thanks for your time.

EDIT: I found out that MPC does it as well, will test it.  
EDIT 2: It works on MPC not on Spotify. Will search for autohotkey and will inform you.
EDIT 3: There is a issue with the new spotify, it works if you are using multimedia keycodes. You can find more here: https://stackoverflow.com/questions/28957636/hotkey-for-next-song-in-spotify#
Also I will test this script once it is fixed http://www.autohotkey.com/board/topic/94218-spotify-global-hotkeys-volume-control-skip-songs-current-song-to-clipboard-star-songs-without-opening-spotify/
Will keep you updated when it works. I would like to use Like en Dislike and for Mute you could use pause.
Edit 4: Downloaded the old version (Spotify 0.9.15.27) and got this and this script working.


--- Code: Autohotkey ---#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 runningspotify = ahk_class SpotifyMainWindow ;Set variable for Spotify Window Name ;|---------------|;|--[ HOTKEYS ]--|;|---------------|; "F5" for previous F5:: {        ControlSend, ahk_parent, ^{Left}, %spotify%         return } ; "F6" for next F6:: {         ControlSend, ahk_parent, ^{Right}, %spotify%         return }  ; "F4" for pauseF4::{         ControlSend, ahk_parent, {Space}, %spotify%         return}  ; "F10" for track-nameF10:: {         WinGetTitle, spotify_playing, %spotify% ;Get the title of Spotify which contains the track-name                StringTrimLeft, trimmed_playing, spotify_playing, 10 ;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 upF3::{         ControlSend, ahk_parent, ^{Up}, %spotify%         return }  ; "F2 for volume downF2::{         ControlSend, ahk_parent, ^{Down}, %spotify%         return }  ; "F8" for vote upF8::{ ;Store active window        MouseGetPos, , , winID ;Left click near the song title in the "Now Playing" box.        WinGetPos,  ,  ,  , spotifyHeight, %spotify%        clickX := 639        clickY := 511         ControlClick, x%clickX% y%clickY% , %spotify%, , Left, , NA    ;Restore original window and mouse position.        WinActivate ahk_id %winID%         return} ; "F7" for vote downF7::{ ;Store active window        MouseGetPos, , , winID ;Left click near the song title in the "Now Playing" box.        WinGetPos,  ,  ,  , spotifyHeight, %spotify%        clickX := 590        clickY := 510        ControlClick, x%clickX% y%clickY% , %spotify%, , Left, , NA    ;Restore original window and mouse position.        WinActivate ahk_id %winID%         return} ; "F9" for add to my songsF9::{ ;Store active window        MouseGetPos, , , winID ;Left click near the song title in the "Now Playing" box.        WinGetPos,  ,  ,  , spotifyHeight, %spotify%        clickX := 178        clickY := 943        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}
Will tets with new version, will update again.
Also note to get the add to your music collection, thumbs up and down working you need to edit the script with you position. I would like to see a way that you can give that up in the application.  

Edit 5: With the new version this part only works.

--- Code: Autohotkey ---#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 runningspotify = ahk_class SpotifyMainWindow ;Set variable for Spotify Window Name ;|---------------|;|--[ HOTKEYS ]--|;|---------------|; "F5" for previous F5::Media_Prev ; "F6" for next F6::Media_Next ; "F4" for pauseF4::Media_Play_Pause ;|-----------------|;|--[ 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}
This works perfectly only in playlist or songs. Not on radio, there is no visible way to go back but if you use the hotkey it will force it and play random song.

Could you support the old version for me until the new one is fixed. I will of course help and test it.

skwire:
Hi, uniuse, and welcome to the DonationCoder site.  Apologies for the delay in replying.

Can I ask if you can update Trout to not only remember when you close the app but across files so I can use it with MPH ?-uniuse (April 27, 2015, 06:42 AM)
--- End quote ---

I'm not sure what you're asking for here as MPH already supports Trout.  Regarding the new Spotify, I've tried to make it work but, due to how MPH is written, it's proving to be a right pain in the arse.

skwire:
I think I got the new Spotify partially working (play/pause/stop/next/prev).  Volume controls and like/dislike are not supported for the new Spotify.

Website | Download
v1.1.2 - 2015-05-16
    + Added partial support for the new Spotify client.  Tested against version
      1.0.4.90.  (Thanks, uniuse)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version