Sign in to follow this  
Followers 0
chiners_68

Best way to deal with window apearing on the odd install

4 posts in this topic

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)")

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

PsaltyDS,

cheers works a treat..

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