Jump to content

Recommended Posts

Posted

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.

  • 1 month later...
Posted

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'

 

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...