Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How to show mouse movements with the Au3Recorder tool?

$
0
0
I'm trying to automate an install to speed it up (it's currently very manual and takes ages to do) so I want to use AutoIt to help in this respect.

I used the Au3Recorder tool to generate my MouseClicks and WinWaitActivates but I can't get it to visibly move the mouse to the relevant points that the script clicks. It's not super important that this feature is implemented but I'd like to be able to incorporate it if possible.

My code is:

#region ---Au3Recorder generated code Start (v3.3.7.0) ---

#region --- Internal functions Au3Recorder Start ---
Func Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
EndFunc

Func WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc

AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---

WinWaitActivate("Window A","Welcome")
;MouseMove(748,687) ;Absolute Coords
MouseMove(341,415) ;Relative to Active Window Coords
Sleep(500)
MouseClick("left",341,415,1)

WinWaitActivate("Window A","To continue with")
;MouseMove(432,648) ;Absolute Coords
MouseMove(258,380) ;Relative to Active Window Coords
Sleep(500)
MouseClick("left",258,380,1)

;MouseMove(742,691) ;Absolute Coords
MouseMove(356,419) ;Relative to Active Window Coords
Sleep(500)
MouseClick("left",356,419,1)

WinWaitActivate("Window A","Install")
;MouseMove(742,691) ;Absolute Coords
MouseMove(356,419) ;Relative to Active Window Coords
Sleep(500)
MouseClick("left",356,419,1)

WinWaitActivate("Window A","Successful.")
;MouseMove(639,568) ;Absolute Coords
MouseMove(211,178) ;Relative to Active Window Coords
Sleep(500)
MouseClick("left",211,178,1)

#endregion --- Au3Recorder generated code End ---


I added in the MouseMove commands but it just doesn't want to work with the rest of the code. I've also tried alternating between absolute coordinates and coordinates relative to the active window and that still doesn't work.

Can anybody spot any glaring errors? I'm using Windows Server 2008 R2.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>