AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WMP Controls in MiniMode

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
danwdoo



Joined: 07 Jan 2008
Posts: 9

PostPosted: Fri Jan 25, 2008 12:16 pm    Post subject: WMP Controls in MiniMode Reply with quote

Hello,
I have WMP 11 on Win XP SP2. I am trying to just get the pause and play features to work when WMP is in MiniMode. I have seen numerous posts about this but I have not gotten any of them to work. I know it can be done because I have seen some other hotkey tools accomplish this as well.

When trying some of the posted examples I have usually just pasted this into my autohotkey.ahk default file (though separate files have not worked for me either). This has been driving me nuts as I know this has to be possible but I can't seem to get it to work.

Thanks for any help!
Back to top
View user's profile Send private message
0mega



Joined: 17 May 2007
Posts: 38

PostPosted: Fri Jan 25, 2008 1:28 pm    Post subject: Reply with quote

!a::Send {Media_Next}
!s::Send {Media_Prev}
!d::Send {Media_Stop}
!f::Send {Media_Play_Pause}

?
Back to top
View user's profile Send private message
danwdoo



Joined: 07 Jan 2008
Posts: 9

PostPosted: Fri Jan 25, 2008 2:51 pm    Post subject: Still no luck Reply with quote

This only sort of works when WMP is not minimized (opens a right menu type dialog box but does pause and restart). However the commands do nothing when WMP is in mini mode

Thanks!
Back to top
View user's profile Send private message
peter rivers
Guest





PostPosted: Mon Apr 20, 2009 6:33 pm    Post subject: Reply with quote

Quote:
~a::
Send, {vkB3sc122}
return

Works for me in mini-mode
Back to top
yunhen3350



Joined: 17 Apr 2009
Posts: 20

PostPosted: Tue Apr 21, 2009 2:44 am    Post subject: Reply with quote

"PostMessage / SendMessage" command can make it Wink

Code:
;WinKey+Down to "Play/Pause"
#Down::  SendMessage, 0x111, 18808, , , ahk_class WMPlayerApp
;WinKey+Up to "Stop"
#Up::    SendMessage, 0x111, 18809, , , ahk_class WMPlayerApp
;WinKey+Left to "Previous Song"
#Left::  SendMessage, 0x111, 18810, , , ahk_class WMPlayerApp
;WinKey+Right to "Next Song"
#Right:: SendMessage, 0x111, 18811, , , ahk_class WMPlayerApp
Back to top
View user's profile Send private message
danwdoo



Joined: 07 Jan 2008
Posts: 9

PostPosted: Tue Apr 21, 2009 6:34 am    Post subject: WMP Keys Reply with quote

I had settled on the following which works quite well:

#PgDn::Send {Media_Next}
#PgUp::Send {Media_Prev}
`::Send {Media_Play_Pause}

Interestingly, while the above work, the volume controls I tried below do not:

#up::Send {Media_Volume_Up}
#down::Send {Media_Volume_Down}

But that's relatively minor in the scheme of things.

Danny
Back to top
View user's profile Send private message
yunhen3350



Joined: 17 Apr 2009
Posts: 20

PostPosted: Tue Apr 21, 2009 6:46 am    Post subject: Reply with quote

Code:
;WinKey+Down to "Play/Pause"
#Down::  SendMessage, 0x111, 18808, , , ahk_class WMPlayerApp
;WinKey+Up to "Stop"
#Up::    SendMessage, 0x111, 18809, , , ahk_class WMPlayerApp
;WinKey+Left to "Previous Song"
#Left::  SendMessage, 0x111, 18810, , , ahk_class WMPlayerApp
;WinKey+Right to "Next Song"
#Right:: SendMessage, 0x111, 18811, , , ahk_class WMPlayerApp

;WinKey+PgUp to "Volume Up"
#PgUp:: SendMessage, 0x111, 18815, , , ahk_class WMPlayerApp
;WinKey+PgDn to "Volume Down"
#PgDn:: SendMessage, 0x111, 18816, , , ahk_class WMPlayerApp
;WinKey+End to "Mute/Unmute"
#End:: SendMessage, 0x111, 18817, , , ahk_class WMPlayerApp


Main features of "PostMessage / SendMessage" is can send command in background, which mean works with minimode too, even u winhide the window media player, it still work as charm~ Wink
Back to top
View user's profile Send private message
danwdoo



Joined: 07 Jan 2008
Posts: 9

PostPosted: Tue Apr 21, 2009 7:13 am    Post subject: Reply with quote

I tested these for fun and none of them work for me when WMP is in Mini Mode. They work fine when it is maximized or minimized. The commands I listed work in all situations I have tried so far--except the volume controls.

Danny
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 7295
Location: Australia

PostPosted: Tue Apr 21, 2009 1:09 pm    Post subject: Re: WMP Keys Reply with quote

danwdoo wrote:
Interestingly, while the above work, the volume controls I tried below do not:
Media_Volume_Up and Media_Volume_Down usually control Windows' master volume, not Windows Media Player. Smile
yunhen3350 wrote:
Main features of "PostMessage / SendMessage" is can send command in background,
...but it can only send to hidden windows if you first use:
Code:
DetectHiddenWindows, On
Back to top
View user's profile Send private message Visit poster's website
danwdoo



Joined: 07 Jan 2008
Posts: 9

PostPosted: Wed Apr 22, 2009 2:28 am    Post subject: Reply with quote

Is there a particular place to put the "DetectHiddenWindows, On". I tried just placing it in my default autohotkey.ahk above the WMP commands but it did not have any effect. The controls still will not work in mini-mode. Perhaps I'm using it wrong somehow?

Thanks for all your help on this!
Danny
Back to top
View user's profile Send private message
yunhen3350



Joined: 17 Apr 2009
Posts: 20

PostPosted: Wed Apr 22, 2009 4:08 am    Post subject: Reply with quote

Quote:
Is there a particular place to put the "DetectHiddenWindows, On".

Place it on script starting initial part as where
Code:
#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 ;here


Quote:
...but it can only send to hidden windows if you first use:

Oops, sorry for my mistake. thanks for remind, Lexikos


I'd experienced that the "lParam" for "PostMessage / SendMessage" commands may various from every PC.
In that case u'll need to capture the "lParam" from "Winspector" software.

I'd tried mine, functional at toolbar mode too, but not at skin mode
Back to top
View user's profile Send private message
danwdoo



Joined: 07 Jan 2008
Posts: 9

PostPosted: Wed Apr 22, 2009 9:46 am    Post subject: Reply with quote

Tested again with these additions put at the top of the script (mine did not have any of them) and now it works with the new commands--including volume!

Thanks a bunch!
Danny
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group