Cuervo Posted November 30, 2009 Share Posted November 30, 2009 Hey all, I'm going through some scripts looking at samples of code and I see this. What purpose or function does it serve? I've also seen references that this is no longer needed as it is a duplicate function from an #include now, possible Misc.au3 file. Func _IsPressed($sHexKey, $vDLL = 'user32.dll') ; $hexKey must be the value of one of the keys. ; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is. Local $a_R = DllCall($vDLL, "int", "GetAsyncKeyState", "int", '0x' & $sHexKey) If Not @error And BitAND($a_R[0], 0x8000) = 0x8000 Then Return 1 Return 0 EndFunc ;==>_IsPressed -Tim Link to comment Share on other sites More sharing options...
whim Posted November 30, 2009 Share Posted November 30, 2009 Look in the help file, under User Defined Functions Reference -> Misc Management -> _IsPressed Or, if you prefer, type _IsPressed in the helpfile's search box on the "Index" tab ... hth, whim Link to comment Share on other sites More sharing options...
Cuervo Posted November 30, 2009 Author Share Posted November 30, 2009 (edited) Look in the help file, under User Defined Functions Reference -> Misc Management -> _IsPressedOr, if you prefer, type _IsPressed in the helpfile's search box on the "Index" tab ...hth,whimI do read the help files as well as do a search on this forum along with google before posting. Like a lot of non progammers without getting pretty specific help I'm clueless on most of the aspects about programming.I did however find the function in the Misc.au3 file so I can assume that an include would mean this function is not needed in a file.Thanks for helping. Edited November 30, 2009 by Cuervo -Tim Link to comment Share on other sites More sharing options...
jvanegmond Posted November 30, 2009 Share Posted November 30, 2009 You no longer have to manually include this function in one of your scripts. It was added to the standard libraries some time ago, before this many people copy-pasta it from a topic in the example script, to save them this trouble, and because there were several versions, the best version was added to the standard libraries.Like a lot of non progammers without getting pretty specific help I'm clueless on most of the aspects about programming.Like a lot of people, without getting specific questions, I'm pretty clueless on what to give as answer. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Cuervo Posted November 30, 2009 Author Share Posted November 30, 2009 You no longer have to manually include this function in one of your scripts. It was added to the standard libraries some time ago, before this many people copy-pasta it from a topic in the example script, to save them this trouble, and because there were several versions, the best version was added to the standard libraries.Like a lot of people, without getting specific questions, I'm pretty clueless on what to give as answer.Thanks, I see we have something in common. I do appreciate your responce. -Tim 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