Jump to content

Best way to deal with window apearing on the odd install


chiners_68
 Share

Recommended Posts

Currently working on my automating a software install but the odd machine has an aditional window apear.. how can I get this to detect that window & process another line or cary on the script if it dosent show..?

the lines in red below need to run on the odd machine but it dosent apear on all. how can I do this..?

;Run ProAchieve

Run('"C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE"' & _

' /runtime /wrkgrp ' & _

'"C:\Program Files\CompassCC\ProAchieve\CCC.MDW" ' & _

'"C:\Program Files\CompassCC\ProAchieve\ProAchTarg.MDE"')

winwait("Locate Link File")

send("\\eastberks.ac.uk\prosoft$\CompassCC\v7.x.x\Shared\CCCLinks.mdb")

Send("!c")

;winactive("ProAchieve/ProTarget - Locate folder")

;Send("!c")

winwait("Confirm update files", "The following file(s) have been updated or upgraded:")

Send("!y")

winwait("Logon")

send("admin")

send("{TAB}")

send("admin")

send("{ENTER}")

winclose("ProAchieve/ProTarget (7.2.4)")

Link to comment
Share on other sites

Currently working on my automating a software install but the odd machine has an aditional window apear.. how can I get this to detect that window & process another line or cary on the script if it dosent show..?

the lines in red below need to run on the odd machine but it dosent apear on all. how can I do this..?

I've run into that. Set up a loop that waits for either:

winwait("Locate Link File")
send("\\eastberks.ac.uk\prosoft$\CompassCC\v7.x.x\Shared\CCCLinks.mdb")
Send("!c")
While 1
     ; Locate folder window may or may not occur
     If WinWait("ProAchieve/ProTarget - Locate folder", "", 1) Then 
          WinActivate("ProAchieve/ProTarget - Locate folder")
          Send("!c")
     EndIf

     ; Handle confirm update window regardless
     If WinWait("Confirm update files", "The following file(s) have been updated or upgraded:", 1) Then
          WinActivate("Confirm update files", "The following file(s) have been updated or upgraded:")
          Send("!y")
          ExitLoop
     EndIf
Wend

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...