ReaImDown Posted June 4, 2007 Posted June 4, 2007 (edited) Is there a way to make those work ( BE, BF, DC, etc.) ??? Using another dll, or I don't know.no clue, but I am looking for the same answer why doesnt this work? If _IsPressed('10') = True & _IsPressed('bf') = True Then MsgBox(0,"","? pressed") EndIf Edited June 4, 2007 by ReaImDown [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
/dev/null Posted June 4, 2007 Posted June 4, 2007 Funny how looking @ AutoIt Help file under ASCII Character Codes doesn't match what I've posted.. From help file:; 3b Semicolon (does not work for me with _IsPressed , ba does work for me)Am I reading the wrong part of the help file, or am I not translating 3b to ba by some form of formula that I missed ?why do you think _IsPressed() works with ASCII codes? The "magic" hex numbers are Virtual-Key Codes. See MSDN http://msdn2.microsoft.com/en-us/library/ms646293.aspx __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
PartyPooper Posted June 4, 2007 Posted June 4, 2007 This is how I add a 'wait until user has released key' loop using _IsPressed... If _IsPressed($key) Then DoCode() Func DoCode() While _IsPressed($key) Sleep(50) End ; begin code here after user has released the key EndFunc Alternatively, if you are using more than one key (eg. CTRL-F1) then I do this... If _IsPressed($key1) And _IsPressed($key2) Then DoCode() Func .... While _IsPressed($key1) or _IsPressed($key2) Sleep(50) End ; begin code here after user has released both keys EndFunc
kiwikid Posted June 5, 2007 Posted June 5, 2007 Yeah, I was a little dissapointed with the UDF document on _IsPressed as it didn't cover all the keys. Just go to the following link to get the virtual key codes for every key: All virtual key codes.Additionally the reason why you're getting the same key presses 6 - 7 times is because you haven't set up a keydown flag if you will. I have some code posted in another _IsPressed topic that built upon a couple other users work that addresses your problems. Looking back on that code I would have done it just a little bit differently now and would have increased the two dimensional array to [83][3] in which the second array would have addressed the virtual key code, key down state, and then the dec ascii code for the key when shift is pressed. It would have made the key trapping a hell of a lot easier to handle. Hindsight is 20/20 though.
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