go0b3r Posted February 8, 2006 Posted February 8, 2006 ok well i saw this script somewhere else, but dont know how to use this? #include <misc.au3> HotKeySet ("{ESC}", "quitme") While 1 For $i = 1 To 255 If _IsPressed (Hex ($i)) Then MsgBox (0, "pressed", $i) EndIf Next WEnd Func quitme() Exit EndFunc Ive tried useing other scripts like that but get errors each time. Do i need to add something?? Sorry for being so noobish lol.
TheCuz Posted February 8, 2006 Posted February 8, 2006 What is the error(s) that your are getting with the other scripts. [font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font]
Shibuya Posted February 8, 2006 Posted February 8, 2006 I don't really get what u're trying to do... anyway, I've amended the script abit and this works #include <misc.au3> HotKeySet ("{ESC}", "quitme") $dll = DllOpen("user32.dll") While 1 For $i = 1 To 255 If _IsPressed (Hex ($i, $dll)) Then MsgBox (0, "pressed", $i) EndIf Next WEnd DllClose($dll) Func quitme() Exit EndFunc The speed of sound is defined by the distance from door to computer divided by the time interval needed to close the media player and pull up your pants when your mom shouts "OH MY GOD WHAT ARE YOU DOING!!!"
greenmachine Posted February 8, 2006 Posted February 8, 2006 (edited) I don't really get what u're trying to do... anyway, I've amended the script abit and this works #include <misc.au3> HotKeySet ("{ESC}", "quitme") $dll = DllOpen("user32.dll") While 1 For $i = 1 To 255 If _IsPressed (Hex ($i, $dll)) Then MsgBox (0, "pressed", $i) EndIf Next WEnd DllClose($dll) Func quitme() Exit EndFunc@Shibuya - what did you do? You don't need to open and close the dll (the _IsPressed function does it automatically), and you put the variable $dll inside the hex function as the "length" parameter. If that actually does work, I'm amazed. @goob3r - I believe the original post was my code. It works fine if you're using (and running) the beta version of AutoIt. -EDIT- The message box doesn't really help right now. It should also include Hex ($i), since that's the format that the _IsPressed function uses. As for what this does, it gets the numerical and (if included) hex value of the key that is pressed. Edited February 8, 2006 by greenmachine
go0b3r Posted February 8, 2006 Author Posted February 8, 2006 im using v3, does it need the beta version? ITs not that script in particular im inquiring about, just almost any complex scripts on here i cant run. Also, if there somewhere that explains what those complex commands mean lol, its all gibberish to me.
Oxin8 Posted February 8, 2006 Posted February 8, 2006 for _IsPressed, you're gonna need the beta. The help file and tutorials around here are pretty good for explaining things. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus
Shibuya Posted February 8, 2006 Posted February 8, 2006 @greenmachine ooops...my bad...somehow my scite returned me this: ERROR: Hex() [built-in] called with wrong number of args. so i thought it could be a missing dll call like what the help file did for _IsPressed. The speed of sound is defined by the distance from door to computer divided by the time interval needed to close the media player and pull up your pants when your mom shouts "OH MY GOD WHAT ARE YOU DOING!!!"
greenmachine Posted February 8, 2006 Posted February 8, 2006 @goob3r - I believe the original post was my code. It works fine if you're using (and running) the beta version of AutoIt.Notice I did say beta in that sentence. So yes, beta is good.Link: http://www.autoitscript.com/autoit3/files/beta/autoit/Also, if you don't already have it, I strongly suggest using Scite, a text editor built to be used with AutoIt. You can get it here:http://www.autoitscript.com/autoit3/scite/downloads.php
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