Blindz Posted September 7, 2009 Share Posted September 7, 2009 (edited) hi im trying to make program that will press the same time the Key space that i did i started my project but i dont know what do to now... here's my code $dll = DllOpen("user32.dll") While 1 sleep (1) If _IsPressed("20", $dll) Then (count how many sec i pressed key) (if i press f10 then press space the for x sec) ExitLoop EndIf WEnd DllClose($dll) Thanks Edited September 7, 2009 by Blindz Link to comment Share on other sites More sharing options...
JohnOne Posted September 7, 2009 Share Posted September 7, 2009 Try here mate http://www.autoitscript.com/forum/index.php?showtopic=101956&view=findpost&p=724303 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Blindz Posted September 7, 2009 Author Share Posted September 7, 2009 yea but someone tought that it was for keylogger but its not! Link to comment Share on other sites More sharing options...
Blindz Posted September 7, 2009 Author Share Posted September 7, 2009 #include <misc.au3> $dll = DllOpen("user32.dll") While 1 sleep (1) If _IsPressed("20", $dll) Then $start = TimerInit() ExitLoop EndIf WEnd While _IsPressed ( "20", $dll ) Sleep(1) WEnd TimerDiff($start) DllClose($dll) almost done but i dont know what do to after the 2nd loop Send("space") for TimerDiff($start)?? Link to comment Share on other sites More sharing options...
Blindz Posted September 7, 2009 Author Share Posted September 7, 2009 (edited) can someone tell me why the sleep isnt good (where the function Shoot is)?? #include <misc.au3> HotKeySet("{F3}","Shoot") $dll = DllOpen("user32.dll") While 1 sleep (1) If _IsPressed("20", $dll) Then $start = TimerInit() ExitLoop EndIf WEnd While _IsPressed ( "20", $dll ) Sleep(1) WEnd Func Shoot() Send("{SPACE down}") Sleep (TimerDiff($start) ) Send ("{space up}") EndFunc While 1 Sleep ( 1) Wend DllClose($dll) Thanks Edited September 7, 2009 by Blindz 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