EliTe_ThuT Posted April 27, 2011 Share Posted April 27, 2011 Hi, I want to set a hotkey in my script, but I would like to use the "Next Track" key on my keyboard. Is there any way I can retrieve the code for this key? Thanks Link to comment Share on other sites More sharing options...
monoscout999 Posted April 27, 2011 Share Posted April 27, 2011 (edited) Hi, I want to set a hotkey in my script, but I would like to use the "Next Track" key on my keyboard. Is there any way I can retrieve the code for this key? Thanks maybe.. i´m not sure... i think i have some solution for that.. in a minute i post it here... your key hex code is "0xB0" try it... and look the source web SOURCE MSDN LINK If not that tell me and i make you an API call.. i think the WINAPI GetKeyboardState from user32.dll it might help you to indentify the key value... The winapiex already have the functions on it... EDIT if the value i give you is NOT what you need.. look at the example of the function _WinAPI_IsPressed() inside the winapiex helpfile it tell you the value of the key pressed..! #Include <WinAPIEx.au3> Opt('GUICloseOnESC', 0) Opt('MustDeclareVars', 1) Global $Label, $Key, $Prev = Default GUICreate('MyGUI', 200, 200) $Label = GUICtrlCreateLabel('', 10, 59, 180, 82, 0x01) GUICtrlSetFont(-1, 48, 400, 0, 'Tahoma') GUISetState() While 1 Sleep(10) If GUIGetMsg() = -3 Then ExitLoop EndIf $Key = 0 $Key = _WinAPI_IsPressed(0x08, 0xFF) If $Key <> $Prev Then GUICtrlSetData($Label, '0x' & Hex($Key, 2)) $Prev = $Key EndIf WEnd Edited April 29, 2011 by monoscout999 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