Sign in to follow this  
Followers 0
DarkNecromancer

Win Media Control

5 posts in this topic

Hi guys, I dont use alot of the new stuff in V3, still program as though i used V2 :), anyways i made a little thing to control win media player while in games and stuff and i just added a delete hotkey.

HotKeySet ( "^{NUMPAD6}", "mnext" )
HotKeySet ( "^{NUMPAD4}", "prev" )
HotKeySet ( "^{NUMPAD8}", "up" )
HotKeySet ( "^{NUMPAD5}", "down" )
HotKeySet ( "^{NUMPAD2}", "del" )
HotKeySet ( "^{ENTER}", "pause" )

while 1
    sleep( 50 )
wend

func mnext()
    send("{MEDIA_NEXT}")
Endfunc
func prev()
    send("{MEDIA_PREV}")
Endfunc
func up()
    send("{VOLUME_UP}")
Endfunc
func down()
    send("{VOLUME_DOWN}")
Endfunc
func pause()
    send("{MEDIA_PLAY_PAUSE}")
Endfunc
Func del()
    ControlSend ("Windows Media Player", "", "ATL:SysListView322", "{DEL 2}")
EndFunc
Now the delete works fine, but when i use next then delete, the selected and currently playing are no longer on the same item. does anyone know any way to make them always be the same?

Share this post


Link to post
Share on other sites



Well the best work around I could find is this...

It should work as long as before you run it you have the currently playing item selected.

HotKeySet ( "^{NUMPAD6}", "mnext" )
HotKeySet ( "^{NUMPAD4}", "prev" )
HotKeySet ( "^{NUMPAD8}", "up" )
HotKeySet ( "^{NUMPAD5}", "down" )
HotKeySet ( "^{NUMPAD2}", "del" )
HotKeySet ( "^{ENTER}", "pause" )

While 1
    sleep( 50 )
wend

Func mnext()
    Send("{MEDIA_NEXT}")
    ControlSend ("Windows Media Player", "", 1, "{DOWN}")
Endfunc

Func prev()
    Send("{MEDIA_PREV}")
    ControlSend ("Windows Media Player", "", 1, "{UP}")
Endfunc

Func up()
    Send("{VOLUME_UP}")
Endfunc

Func down()
    Send("{VOLUME_DOWN}")
Endfunc

Func pause()
    Send("{MEDIA_PLAY_PAUSE}")
Endfunc

Func del()
    ControlSend ("Windows Media Player", "", 1, "{DEL 2}")
EndFunc

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

hmm, i have it on random play, but i could switch it, doesn't matter. does anyone know how to do it will your guys fancy dlls? :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You could just make a playlist with just song's you want on it, that way you wouldn't have to delete any :).

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

lol i suppose, i just have built up a list of song a mile long and 90% of them i dont like, so i wanted to just press play, go play some css or guild wars and just press next, listen to a few songs, and delete the rest. But while trying to test all this, i ended up deleting 40% of it anyways. so i guess thats what im going to end up doing but i was just wondering how you would interface with it because i noticed that win media player has some odd Control IDs and classnames

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0