Jump to content

Recommended Posts

Posted

hi

i wrote script for unattended installation of photoshop here are lines :

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

Run('K:\cs3\Setup.exe')

WinWait("Adobe Photoshop CS3 Installer: System Check","" , 3)

If Not WinActive("Adobe Photoshop CS3 Installer: System Check","") Then WinActivate("Adobe Photoshop CS3 Installer: System Check","")

WinWaitActive("Adobe Photoshop CS3 Installer: System Check","")

If WinExists("Adobe Photoshop CS3 Installer: System Check")=1 Then Exit(0) if not (8)

WinWait("Adobe Photoshop CS3 Installer: License Agreement","")

If Not WinActive("Adobe Photoshop CS3 Installer: License Agreement","") Then WinActivate("Adobe Photoshop CS3 Installer: License Agreement","")

WinWaitActive("Adobe Photoshop CS3 Installer: License Agreement","")

Send("{TAB}{TAB}{ENTER}")

WinWait("Adobe Photoshop CS3 Installer: Summary","")

If Not WinActive("Adobe Photoshop CS3 Installer: Summary","") Then WinActivate("Adobe Photoshop CS3 Installer: Summary","")

WinWaitActive("Adobe Photoshop CS3 Installer: Summary","")

Send("{TAB}{TAB}{TAB}{ENTER}")

WinWait("Adobe Photoshop CS3 Installer: System Check","")

the problem i have is if internet explorer is open the main setup ( cs3.exe) can not continue so i want if this happen the script exit from memory and if this does not happen ( internet explorer is not open ) and set up can continue normally the script continue the rest of lines

so i want the script execute those red lines if it found this window( Adobe Photoshop CS3 Installer: System Check) which means explorer is open and script should exit

otherwise continue from the blue line{ WinWait("Adobe Photoshop CS3 Installer: License Agreement","")} up to end and compelete installation

plz help me really confused

ps. i added If WinExists("Adobe Photoshop CS3 Installer: System Check")=1 Then Exit(0) if not (8) but it doesnot bypass the red lines if the set up must continue correctly and script should remain

Posted

Try this:

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Run('K:\cs3\Setup.exe')
If WinWait("Adobe Photoshop CS3 Installer: System Check","" , 3) == 1 then
Exit
Endif
WinWait("Adobe Photoshop CS3 Installer: License Agreement","")
If Not WinActive("Adobe Photoshop CS3 Installer: License Agreement","") Then WinActivate("Adobe Photoshop CS3 Installer: License Agreement","")
WinWaitActive("Adobe Photoshop CS3 Installer: License Agreement","")
Send("{TAB}{TAB}{ENTER}")
WinWait("Adobe Photoshop CS3 Installer: Summary","")
If Not WinActive("Adobe Photoshop CS3 Installer: Summary","") Then WinActivate("Adobe Photoshop CS3 Installer: Summary","")
WinWaitActive("Adobe Photoshop CS3 Installer: Summary","")
Send("{TAB}{TAB}{TAB}{ENTER}")
WinWait("Adobe Photoshop CS3 Installer: System Check","")

Also to make it easier to understand your code next time, make sure you put it between the autoit tags, see BB help for more information.

Dave

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!!

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
  • Recently Browsing   0 members

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