Confounded Posted April 6, 2007 Posted April 6, 2007 (edited) CODE$push = 0 While 1 If _IsPressed($s_24) Then If $push = 0 Then Sleep(1000) EndIf $push = 1 EndIf If Not _IsPressed($s_24) Then $push = 0 WEnd WARNING: $s_24: possibly used before declaration. It does not seem to matter if I put my variable as plain 24, $s_24, or 23. No doubt there is a simple answer...all I can say is that I've read the examples and Help file. Thanks in advance! Edited April 6, 2007 by Confounded
Paulie Posted April 6, 2007 Posted April 6, 2007 Confounded said: CODE$push = 0 While 1 If _IsPressed($s_24) Then If $push = 0 Then Sleep(1000) EndIf $push = 1 EndIf If Not _IsPressed($s_24) Then $push = 0 WEndWARNING: $s_24: possibly used before declaration. It does not seem to matter if I put my variable as plain 24, $s_24, or 23. No doubt there is a simple answer...all I can say is that I've read the examples and Help file. Thanks in advance!#include <Misc.au3> $push = 0 While 1 If _IsPressed(24) Then If $push = 0 Then Sleep(1000) EndIf $push = 1 EndIf If Not _IsPressed(24) Then $push = 0 WEnd better?
Confounded Posted April 6, 2007 Author Posted April 6, 2007 Genius! Thank you many, many times. My sister will have your babies.
Kourath Posted April 6, 2007 Posted April 6, 2007 (edited) what are you trying to represent with $S_24? the variable is undeclared, so thats why its causing you problems. I took a look at the help file and in the remarks it shows all the values, so you should just be able to pop one right into the function and have it run correctly. heres what i came up with (assuming you were trying to detect when the "Home" key is pressed, if not your going to have to find the value for the key your trying to detect in the help file) ;AutoIt Version: 3.2.1.14 (beta) #Include <Misc.au3> $push = 0 While 1 If _IsPressed(24) Then If $push = 0 Then Sleep(1000) EndIf $push = 1 EndIf If Not _IsPressed(24) Then $push = 0 WEnd does that help? edit: seems i was beaten x.x Edited April 6, 2007 by Kourath
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