Jump to content

Newbie help


Recommended Posts

Hi, I found this great program just some time ago, and I'm now trying to make a script that would install all the basic programs (Winrar, Firefox, Google Earth..) that I want after fresh Windows install.

How can I make the script to alert if some of the WinWaitActive fails after the timeout? Like a message box with Retry, Continue (and skip to the next program) and Cancel?

So: Something odd happens with application A --> WinWaitActive fails. PC beeps and message box pops up.

If the install has been put out of focus for example by firewall, user can refocus the window and click Retry.

If the install fails/whatever, user can Continue, making the script to move on to application B.

Could this be done in the beginning of the script only once, or do I have to write all this after every WinWaitActive? :whistle:

Thank you and sorry for my english! :)

Link to comment
Share on other sites

Im not sure what you mean by this:

Switch $msg

Case 3

;abort

Case 4

;retry

Case 5

;ignore

EndSwitch

Did I say Im a newbie? :)

Anyway, I could of course do the MsgBox manually after every WinWaitActive, but what a mess would that be! I mean, I cant do it like this:

Run("winzip90.exe")

$win = WinWaitActive("WinZip® 9.0 SR-1 Setup")

If $win = 0 Then

$msg = MsgBox(18,"Warning","WinWaitActive falied.")

EndIf

If $msg = "retry" (dont have the numbers here) Then $win (<-- not sure if thats right either, but you know what i mean?)

If $msg = "skip" Then $Firefox

If $msg = "cancel" Then Exit

$Firefox = Run("firefoxinstall.exe")

And so on...

Hmm well, afterall I _could_ do it like that, but I guess (and hope) it isnt the smartest way :)

Sorry I know Im not good at explaining this, especially when I've just started learning (am I even at the right track?). :whistle:

EDIT:

Oh yeah, theres about 10 dialog boxes at the Winzip install, and putting that to every one of them doesnt seem.. right.

Edited by FoxZilla
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...