loki1982 Posted July 24, 2008 Share Posted July 24, 2008 (edited) Just messing around with the _ispressed function and cant get it to differentate between lower and uppercase. Here is what ive got, and I just cant figure it out. While 1 Sleep ( 250 ) Select case _IsPressed("41", $dll) MsgBox(0,"_IsPressed", "A") case _IsPressed("61", $dll) MsgBox(0,"_IsPressed", "a") EndSelect WEnd DllClose($dll) according to the help file value "41" is uppercase A, and "61" is lower case a. It always displays "A" in my message box. If I comment out the case statement for value "41" no message box will appear no matter if I try lower or upper case A. *** edit *** ok wierd. If I use the asc function to find the value of a and A I get 97 for a and 65 for A. Im really confused now Edited July 24, 2008 by loki1982 Link to comment Share on other sites More sharing options...
Andreik Posted July 24, 2008 Share Posted July 24, 2008 For _IsPressed function it doesn't matter if is A or a, it`s important if the key was pressed. If use Asc code, it`s important that is A or a. Asc("A") = 64 (41 Hex) Asc("a") = 97 (61 Hex) I hope you got it right? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
loki1982 Posted July 24, 2008 Author Share Posted July 24, 2008 For _IsPressed function it doesn't matter if is A or a, it`s important if the key was pressed.If use Asc code, it`s important that is A or a.Asc("A") = 64 (41 Hex)Asc("a") = 97 (61 Hex)I hope you got it right?ok I think I got it. So what would you suggest if I want to check and see if a captial A was pressed, or a lower case a? Any suggestion? Link to comment Share on other sites More sharing options...
loki1982 Posted July 24, 2008 Author Share Posted July 24, 2008 ok I think I got it. So what would you suggest if I want to check and see if a captial A was pressed, or a lower case a? Any suggestion?Nevermind I figured it out. I added an if statement to afterward to check if shift was being pressed down.Thanks for your help 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