Sign in to follow this  
Followers 0
Alleine

Autoinstalling Alcohol 52

2 posts in this topic

Hi,

It's the first time I use AutoScript.

Well, I am trying to create a Alcohol 52 autoinstaller but I have a problem:

$title = "Alcohol 52% FE Version 1.9.6.5429"

Run("Alcohol52.exe")

WinWait($title)

ControlClick($title, "&Next >", "Button2")

ControlClick($title, "I &Agree", "Button2")

ControlClick($title, "Include the Alcohol Soft Toolbar (recommended).", "Button4")

ControlClick($title, "&Next >", "Button2")

ControlClick($title, "&Next >", "Button2")

ControlClick($title, "&Install", "Button2")

Here I should put a "wait" but I have tried with several words...

ControlClick($title, "&Run Alcohol 52% >", "Button4")

ControlClick($title, "&Finish >", "Button2")

Sorry if I make a mistake but the spanish forum is desert...

Thanks you

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You can use winwait as previously used in your script.

When using WinWait I also specify the text of the window so as to ensure the correct window is showing. I also make sure the window is active.

Global Const $title = "Alcohol 52% FE Version 1.9.6.5429"
Global Const $txt = 'Completing the Alcohol 52% Setup Wizard'

Run("Alcohol52.exe")
WinWait($title)
ControlClick($title, "&Next >", "Button2")
ControlClick($title, "I &Agree", "Button2")
ControlClick($title, "Include the Alcohol Soft Toolbar (recommended).", "Button4")
ControlClick($title, "&Next >", "Button2")
ControlClick($title, "&Next >", "Button2")
ControlClick($title, "&Install", "Button2")

; Added -------------------------------------------------
WinWait($title, $txt)
WinWait($title, $txt)
If Not WinActive($title, $txt) Then WinActivate($title, $txt)
WinWaitActive($title, $txt)
; Added -------------------------------------------------

ControlClick($title, "&Run Alcohol 52% >", "Button4")
ControlClick($title, $txt, "Button2")

You can also the Scriptwriter to create a script for you, it records the window text and the mouse movements.

Edited by benners

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  
Followers 0