ahab Posted September 5, 2005 Share Posted September 5, 2005 (edited) So I have some off brand keyboard that I can no longer find drivers for. It has the semi-standard back, forward, vol+ vol- and so forth keys on it. Only a few don't work. Running AutoHotkey and pressing these keys gives me the value of "176" for next track.. I'm not quite sure of what to make of this. HotkeySet("176","Media_Next") Func Media_Next() Send("{MEDIA_NEXT}") EndFunc While 1 Sleep(250) WendDoes nothing for me. AutoHotkey can understand it, but I'd rather just stick this in with all my other hotkeys that are written in Autoit. I assume 176 is a hex value for the key. What would I need to set the hotkey as or how can I detect the hotkey? Edited September 5, 2005 by ahab Link to comment Share on other sites More sharing options...
CyberSlug Posted September 6, 2005 Share Posted September 6, 2005 If running Windows XP, you might try TweakUI (the 147 KB download).(Screenshot attached) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
therks Posted September 6, 2005 Share Posted September 6, 2005 Actually, SENDing {MEDIA_NEXT} is just like pressing the key on the keyboard, it's sending the same message, you'll get the same result.You can even use it as a hotkey, I have similar keys on my keyboard, but have them setup to do different things.For example, the "Play/Pause Music" key on my keyboard is hotkeyed to open Winamp.ie:HotKeySet('{MEDIA_PLAY_PAUSE}', '_OpenWinamp') My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
ahab Posted September 6, 2005 Author Share Posted September 6, 2005 (edited) I have the key there... but I don't know what to call it in AutoIt. HotKeySet('{whatgoeshere?}',"DoWhatever") Any way to capture what keys are being pressed in the scheme that AutoIt names them? Edited September 6, 2005 by ahab Link to comment Share on other sites More sharing options...
therks Posted September 6, 2005 Share Posted September 6, 2005 Have a look at the send key list in the help file. If one of the keys mentioned sounds like it might match your key, try it. If you can't find any key at all that looks like it matches, then it may not be available. For instance, on my keyboard, I have a "Power Off" key, it shuts the computer down. I wish I could capture that and just tell it to do nothing as it doesn't even prompt me. Quite annoying. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
ahab Posted September 14, 2005 Author Share Posted September 14, 2005 (edited) TweakUI does not see the key at all.HotKeySet('{MEDIA_NEXT}',"{MEDIA_NEXT}")doesn't work.HotKeySet('{whatgoeshere?}',"{MEDIA_NEXT}") Autohotkey detects the key as 176. What would AutoIt see it as? Edited September 14, 2005 by ahab Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted September 14, 2005 Share Posted September 14, 2005 (edited) The second argument isn't a key, its a function. Try this: HotKeySet('{MEDIA_NEXT}','TestFunc') Func TestFunc() MsgBox(0, "test", "HotKeySet was Successful!") Exit EndFunc While 1 Sleep(15) WEnd Edit: forgot bbtag Edited September 14, 2005 by MSLx Fanboy Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
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