James Posted November 20, 2007 Posted November 20, 2007 Hey,I have just been searching for a way of using the extra keys on my keyboard. A small list of them:Play SoundStop SoundNext TrackPrevious TrackVol UpVol DownMuteRun CalculatorFavouritesRun BrowserI did a search for multimedia keyboard buttons etc but no luck. I found a Developer topic about Keyboard hooking, but it contained no script.Any ideas?Thanks,James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
DW1 Posted November 20, 2007 Posted November 20, 2007 _ispressed will detect them AutoIt3 Online Help
James Posted November 20, 2007 Author Posted November 20, 2007 (edited) Ok, I will take a look at them. Thanks danwilli Found them! Thanks again! Edited November 20, 2007 by JamesB Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
DW1 Posted November 20, 2007 Posted November 20, 2007 A couple more things, first off this makes it easy to find the values: #include <misc.au3> While 1 sleep(10) For $i = 0 to 255 if (_IsPressed(Hex($i))) Then MsgBox(0, "", "You pressed the: " & Chr($i) & " Key!" & @CRLF & "Which would be polled with: _Ispressed(" & $i & ")") EndIf Next WEnd Second thing is, on my PC (i was making a script similar to yours) I ran into a problem with my keyboard calling default applications/actions for those media buttons (some of them anyway). To get around the defaults, I had to download the proper driver/soft for my keyboard, so that I could set the keys to do nothing... or (what I ended up doing)set a couple of them to just run a script (exe) you wrote. Good luck AutoIt3 Online Help
James Posted November 20, 2007 Author Posted November 20, 2007 Yeah, good idea! Thanks again! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
therks Posted November 21, 2007 Posted November 21, 2007 HotKeySet('{MEDIA_PLAY_PAUSE}', '_HotKey') ; Play Sound HotKeySet('{MEDIA_STOP}', '_HotKey') ; Stop Sound HotKeySet('{MEDIA_NEXT}', '_HotKey') ; Next Track HotKeySet('{MEDIA_PREV}', '_HotKey') ; Previous Track HotKeySet('{VOLUME_UP}', '_HotKey') ; Vol Up HotKeySet('{VOLUME_DOWN}', '_HotKey') ; Vol Down HotKeySet('{VOLUME_MUTE}', '_HotKey') ; Mute HotKeySet('{LAUNCH_APP1}', '_HotKey') ; Run Calculator (might be APP2) HotKeySet('{BROWSER_FAVORITES}', '_HotKey') ; Favourites HotKeySet('{BROWSER_HOME}', '_HotKey') ; Run Browser Not all guaranteed to work. My AutoIt Stuff | My Github
James Posted November 21, 2007 Author Posted November 21, 2007 Oh cool! Thanks Saunders Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now