Jump to content

Recommended Posts

Guest SemonesJ
Posted

I want to evaluate the result of the WinWaitActive command and act differently based on the results. I am running an uninstall of software and sometimes the uninstall fails, presenting a different dialog box. So, I need to watch for different possible dialogs.

Something like this:

Dim $TitleFail = "This Text", $TextFail = "That Text", $Title = "Title", $Text = "Text"

$winAct = WinWaitActive ( $TitleFail, $TextFail, 20 )

if $winAct == 1 then

RegWrite ("HKLM\Software\Ours\Started", "Uninst", "REG_SZ", "Failed") $Fflag = 1

Send ("+{tab}{enter}",1)

Exit

Else

RegWrite ("HKLM\Software\Ours\Started", "Uninst", "REG_SZ", "Succeed")

WinWaitActive ( $Title, $Text)

Send ("+{tab}{enter}",1)

ENdif

Exit

Posted

Would something like this work for you?

put your code to start the uninstall process here

put the loop below where you expect the messages to come up

(or look up adlib in the help file)

While 1

Select

Case WinExists

;do stuff here

Exitloop

Case WinExists

;do stuff here

Exitloop

Case WinExists

;do stuff here

Exitloop

...

...

...

EndSelect

Sleep(1)

WEnd

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
×
×
  • Create New...