Sign in to follow this  
Followers 0
Maurice

Use media keys ..

3 posts in this topic

Hey,

I've been using some program to control WMP in the past, but it stopped functioning and so on.

I've now checked and I could simply send the commands to WMP (Microsoft has a shortcut list on their page) with autoit3.

The only problem is that I haven't seen how to make media keys (Those things on the top of your keyboard) as hotkeys.

If all else fails, I can use TweakUI to bind these keys to seperate au3 files but that's not how I'd like it.

So, how do I bind media keys to hotkeys?

I'd like to use the Volume down and up, as well as the media center keys.

Thanks.

Share this post


Link to post
Share on other sites



HotKeySet("{LAUNCH_MEDIA}", "_Open")

HotKeySet("{MEDIA_PLAY_PAUSE}", "_PlayPause")

HotKeySet("{MEDIA_NEXT}", "_Next")

HotKeySet("{MEDIA_PREV}", "_Previous")

HotKeySet("{MEDIA_STOP}", "_Quit")

HotKeySet("{VOLUME_UP}", "_VolumeUp")

HotKeySet("{VOLUME_DOWN}", "_VolumeDown")

HotKeySet("{VOLUME_MUTE}", "_VolumeMute")

The functions listed above are my functions....but the hotkeys are listed here.


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The following works fine with my system, but If the media controls are not working for you, not sure if this will help.

HotKeySet('{VOLUME_DOWN}', '_handle_hk')
HotKeySet('{VOLUME_UP}', '_handle_hk')

While 1
    Sleep(100)
WEnd

Func _handle_hk()
    Local $sHK
    $sHK = @HotKeyPressed   
    HotKeySet($sHK)
    Send($sHK)
    HotKeySet($sHK , '_handle_hk')  
EndFunc
Edited by Quual

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