wodzuu Posted July 18, 2006 Share Posted July 18, 2006 Hi! I want to make script that records my mouse movement, clicking and key pressing (for automated game playing). Is there any function that allows me to 'sniff' key pressing and mouse clicking ? thanks in advance for your help Link to comment Share on other sites More sharing options...
BigDod Posted July 18, 2006 Share Posted July 18, 2006 You could try using AU3Record.exe that comes with SciTe. You will find it in the Scriptwriter folder. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 18, 2006 Moderators Share Posted July 18, 2006 You could try using AU3Record.exe that comes with SciTe. You will find it in the Scriptwriter folder.LOL, waiting for the... that's not quite what I mean statement Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
wodzuu Posted July 19, 2006 Author Share Posted July 19, 2006 You could try using AU3Record.exe that comes with SciTe. You will find it in the Scriptwriter folder.But it does not have option to track pauses between mouse clicks. I want to make a 'game autoplayer' and those pauses are essential for me. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 19, 2006 Share Posted July 19, 2006 HI, sure. Otherwise you can change the Sleep(...) commands to your needs. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
wodzuu Posted July 19, 2006 Author Share Posted July 19, 2006 HI,sure. Otherwise you can change the Sleep(...) commands to your needs. So long,MegaBut it's hard to messure how many milliseconds i have kept my mouse button pressed If i knew how to sniff mouse clicks i could write something like that on my own Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 19, 2006 Moderators Share Posted July 19, 2006 (edited) While 1 $LeftClick = _TimeClick('01') If $LeftClick Then MsgBox(64, 'Info:', 'Left mouse was held for: ' & StringFormat('%i second(s) or %i millisecond(s)', Mod($LeftClick, 60), $LeftClick * 1000)) Sleep(10) WEnd Func _TimeClick($vKey) Local $MouseDownTime If _IsPressed($vKey) Then $MouseDownTime = TimerInit() While _IsPressed($vKey) Sleep(10) WEnd Return TimerDiff($MouseDownTime) / 1000 EndIf Return 0 EndFunc Func _IsPressed($v_R, $v_dll = 'user32.dll') $v_R = DllCall($v_dll, 'int', 'GetAsyncKeyState', 'int', '0x' & $v_R) Return (Not @error And BitAND($v_R[0], 0x8000) = 0x8000) * 1 EndFunc Edited July 19, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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