joncom Posted February 21, 2005 Posted February 21, 2005 I'm trying to make a script that clicks the left mouse repetatively while the mouse is held down. I imagine it would look something like:While Mouse-Is-Down MouseDown("left") Sleep(100) MouseUp("left")WEndNow, of course, "Mouse-Is-Down" is not a function, but I cannot find any function suitable to perform this task.... I would appreciate any help here.
layer Posted February 21, 2005 Posted February 21, 2005 While _IsPressed('01')= 1 MouseDown("left") Sleep(100) MouseUp("left") WEnd Func _IsPressed($hexKey); by Ezzetabi! :-) Local $aR, $bRv $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRv EndFunc im not even sure if that will work, but give it a try, i have company right now! and if you just run the script, it will exit right away, so im not sure if making it idle around with While 1 Sleep (100) Wend and then also haveing the first code that i gave would work, idk i really g2g bye FootbaG
FuryCell Posted February 21, 2005 Posted February 21, 2005 (edited) While _IsPressed('1b');While Left Button is pressed MouseDown("left") Sleep(100) MouseUp("left") WEndNote:I have'nt tested it but i think this might loop indefiniteinly once you press the left mouse button once.If it does just change 1b to the hex code of a diffrent key like 70 for the F1 Key Note 2:Thanks to Ezzetabi for the _IsPressed FuncEdit: Edit:Looks like layer beat me to the post! look at the post times!!!!!! Edited February 21, 2005 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
layer Posted February 21, 2005 Posted February 21, 2005 what kind of keyboard do you have, my hex for the left mouse is 01 FootbaG
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