Jump to content

[SOLVED] WinWait & ControlClick - Question


Recommended Posts

Hi guys, i'me testing this two function and i have made this script:

AutoItSetOption("TrayIconDebug", 1)
AutoItSetOption("SendKeyDelay", 10)
Opt("WinTitleMatchMode", 2)
Opt("WinDetectHiddenText",1)

Global $Title = "Software Title"
Global $Installer = @WorkingDir & "\setup.exe"
Global $Language = "Select language"
Global $Info = "Information"
Global $Account = "Register"
Run($Installer)

TrayTip("", "Installation...", 5)

WinWait($Language, "Select the language")
ControlClick($Language, "", "[CLASS:TNewButton; INSTANCE:1]")

WinWait($Title, "Welcome")
ControlClick($Title, "&Next >", "[CLASS:TNewButton; INSTANCE:1]")

TrayTip("", "Finish", 5)
Sleep(2000)
Exit

Work fine, but i have a little question. somewere on this forum i have read that ControlClick / ControlSend work also if the windows is hide, so i have change the run command to this:

Run($Installer, @SW_HIDE)

But the script is stopped to the first WinWait. Where is my error?

Thanks for support

Edited by johnmcloud
Link to comment
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
 Share

×
×
  • Create New...