I am trying to capture keyboard and mouse movement to record them for AutoIt much like au3record..for those who use autoit; mainly as I wish to add the timer delay capability
Are there any examples on how I can intercept keystrokes and mouse clicks, without disrupting a running program?
Key and mouse recording
-
- Enthusiast
- Posts: 732
- Joined: Fri Jul 14, 2006 8:53 pm
- Location: Malta
- Contact:
Key and mouse recording
I may not help with your coding
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
- TheAutomator
- Enthusiast
- Posts: 112
- Joined: Tue Dec 01, 2020 8:33 pm
Re: Key and mouse recording
Take a look at the UDF Autoit uses to capture keypresses and mouse locations:
Misc.au3 -> _IsPressed ( $sHexKey [, $vDLL = "user32.dll"] )
If you open that file you'll get plenty of info to work with
Now for capturing mouse movement, i would take this kind of approach if you want tot mimic every little move.
Pseudocode:
hope that helps!
Regards
Misc.au3 -> _IsPressed ( $sHexKey [, $vDLL = "user32.dll"] )
If you open that file you'll get plenty of info to work with
Now for capturing mouse movement, i would take this kind of approach if you want tot mimic every little move.
Pseudocode:
Code: Select all
procedure record_mouse()
repeat
if mouse X or Y changes
save time from timer + mouse X and mouse Y
endif
until ispressed(stopbutton)
endprocedure
Regards