Jump to content
Sign in to follow this  
Boss007

AU3Recorder

Recommended Posts

Boss007

Hi All, I have a problem I am trying to record the installation of an exe file (ccleaner), using AU3Recorder to record the mouse movements and clicks as well as window text. on two machines one with xp and the other with win7 operating systems.

After recording has finished the code generated has a bug.

When runing the generated script I get an Unterminated string error.

After removing the the error and re-running the installer script, the mouse veers off to the left of my screen and nothing happens.

I watched a demo of Au3Recorder and followed it to the letter. in the video The demo worked fine and the generated script followed all the mouse movements and clicks.

I have tried all sorts of configurations trying to get it to work, I tried a new recording and script on a diffrent machine and the same thing happened!

I am a novice at scripting and would really appriciate some help on this one thanks! ps here is the generated code I think the mouse movement is not

being recorded correctly because this script dosen't look the same as the one in the blurred video demo.

#region --- Au3Recorder generated code Start ---

Run('D:\software\ccsetup301.exe')

_WinWaitActivate("Installer Language", "Please select a lang")

MouseClick("left", 153, 137, 1)

_WinWaitActivate("C:\Documents and Settings\Owner\Desktop\ccleaner installer.au3 * SciTE", "Source")

MouseClick("left", 102, 348, 1)

MouseMove(745, 12)

MouseDown("left")

MouseMove(744, 12)

MouseUp("left")

_WinWaitActivate("CCleaner v3.01 Setup", "Welcome to the CClea")

MouseMove(338, 12)

MouseDown("left")

MouseMove(338, -28)

MouseUp("left")

MouseMove(361, 368)

MouseDown("left")

MouseMove(363, 372)

MouseUp("left")

_WinWaitActivate("Program Manager", "FolderView")

MouseClick("left", 364, 367, 1)

MouseClick("left", 408, 389, 1)

MouseClick("left", 364, 367, 1)

_WinWaitActivate("CCleaner v3.01 Setup ", "Please review the li")

MouseMove(352, 325)

MouseDown("left")

MouseMove(352, 327)

MouseUp("left")

MouseMove(353, 369)

MouseDown("left")

MouseMove(356, 369)

MouseUp("left")

_WinWaitActivate("CCleaner v3.01 Setup", "Select any additiona")

MouseMove(380, 316)

MouseDown("left")

MouseMove(360, 330)

MouseUp("left")

MouseMove(360, 364)

MouseDown("left")

MouseMove(363, 365)

MouseUp("left")

_WinWaitActivate("CCleaner v3.01 Setup ", "Completing the CClea")

MouseClick("left", 190, 177, 1)

MouseMove(355, 369)

MouseDown("left")

MouseMove(361, 369)

MouseUp("left")

#region --- Internal functions Au3Recorder Start ---

Func _WinWaitActivate($title, $text, $timeout = 0)

WinWait($title, $text, $timeout)

If Not WinActive($title, $text) Then WinActivate($title, $text)

WinWaitActive($title, $text, $timeout)

EndFunc ;==>_WinWaitActivate

#endregion --- Internal functions Au3Recorder Start ---

#endregion --- Au3Recorder generated code Start ---

#endregion --- Au3Recorder generated code Start ---

Share this post


Link to post
Share on other sites
nAutoIT

#region --- Au3Recorder generated code Start ---

Run('D:\software\ccsetup301.exe')

_WinWaitActivate("Installer Language", "Please select a lang")

MouseClick("left", 153, 137, 1)

_WinWaitActivate("C:\Documents and Settings\Owner\Desktop\ccleaner installer.au3 * SciTE", "Source")

MouseClick("left", 102, 348, 1)

MouseMove(745, 12)

MouseDown("left")

MouseMove(744, 12)

MouseUp("left")

_WinWaitActivate("CCleaner v3.01 Setup", "Welcome to the CClea")

MouseMove(338, 12)

MouseDown("left")

MouseMove(338, -28)

That looks suspicious to me, if you are not using 2 Monitors.

Share this post


Link to post
Share on other sites
Boss007

#region --- Au3Recorder generated code Start ---

Run('D:\software\ccsetup301.exe')

_WinWaitActivate("Installer Language", "Please select a lang")

MouseClick("left", 153, 137, 1)

_WinWaitActivate("C:\Documents and Settings\Owner\Desktop\ccleaner installer.au3 * SciTE", "Source")

MouseClick("left", 102, 348, 1)

MouseMove(745, 12)

MouseDown("left")

MouseMove(744, 12)

MouseUp("left")

_WinWaitActivate("CCleaner v3.01 Setup", "Welcome to the CClea")

MouseMove(338, 12)

MouseDown("left")

MouseMove(338, -28)

That looks suspicious to me, if you are not using 2 Monitors.

Thanks but that is not the cause, I have since edited the script to make it work the problem is Au3Recorder does not record the correct mouseclick coordinates it seemes to just enter some default coordinates into the finished script. The mouse move coordinates are also recorded incorrectly.

Has any one else experiencd this problem?

here is a script that works after I removed the inncorrect mouse moves lines and substituted the mouse click coordinates for the correct one.

#region --- Au3Recorder generated code Start ---

If MsgBox(36, "Install CCleaner?", "Would you like to install CCleaner?") =6 Then

Run('D:\software\ccsetup301.exe')

_WinWaitActivate("Installer Language","")

MouseClick("left",643,457,1)

_WinWaitActivate("CCleaner v3.01 Setup","")

MouseClick("left",759,568,1)

_WinWaitActivate("CCleaner v3.01 Setup ","")

MouseClick("left",751,568,1)

_WinWaitActivate("CCleaner v3.01 Setup","")

MouseClick("left",751,568,1)

_WinWaitActivate("CCleaner v3.01 Setup ","")

MouseClick("left",575,384,1)

MouseClick("left",751,568,1)

EndIf

#region --- Internal functions Au3Recorder Start ---

Func _WinWaitActivate($title,$text,$timeout=0)

WinWait($title,$text,$timeout)

If Not WinActive($title,$text) Then WinActivate($title,$text)

WinWaitActive($title,$text,$timeout)

EndFunc

#endregion --- Internal functions Au3Recorder End ---

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

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

This works But only at the screen resolution it was recorded at 1200x800. Is there a way to make this script work regardless of screen size?

I need a script to silently install software without add ons or any other baaggage.

Is there another method to silently install software based on the current open window or button?

I need to install this software on many machines with varying screen sizes. Thanks!

Share this post


Link to post
Share on other sites
nAutoIT

Instead of using MouseClick on the "OK"-Buttons you could use:

Send("{Enter}")

and for unchecking the Boxes something like:

Send("{Tab 3}{Enter}{Tab}")

Share this post


Link to post
Share on other sites
Boss007

Instead of using MouseClick on the "OK"-Buttons you could use:

Send("{Enter}")

and for unchecking the Boxes something like:

Send("{Tab 3}{Enter}{Tab}")

Thanks very much your a diamond! I will try that out.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.