knotten2 Posted February 16, 2006 Share Posted February 16, 2006 (edited) I have this;The green part;If PowerDVD has not been instaled befor, then I want to bypass it. But it seems like the script just "jumps" over it......If I put in --> WinWaitActive("Question", "", 18), in front of the "IF", the script will see the "Question" window and move on after 18sec. And the the "IF" works fine.If I put in --> WinWaitActive("Question", ""), in front of the "IF", the script will see the "Question" window and halt. So the "Question" window are noticed .Iam new at this, so pls. be patient! Run("PowerDVD6.exe")If WinWaitActive("Question", "An existing version") ThenControlClick("Question", "", "Button1")WinWaitActive("Question", "Would you like to keep your personal settings for PowerDVD?") ControlClick("Question", "", "Button2")EndIfWinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "A system with Pentium III 500 or")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button1")WinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "Do you accept all the terms of the")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button2")WinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "Setup will install the following programs into your computer:")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button1")WinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "Please enter your information.")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button2")WinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "Setup will install PowerDVD in")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button1")WinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "Please select a program folder.")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button2")WinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "Please select your default PowerDVD skin.")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button1")WinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "Setup has been completed.")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button1")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button2")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button4")Run "C:\Programfiler\CyberLink\PowerDVD\PowerDVD.exe")If WinExists( "CyberLink Registration") ThenWinWaitActive ("CyberLink Registration", "") ControlClick("CyberLink Registration", "", "Button4")Endifwinactivate("Key Activation.", "Please enter CD-Key to activate PowerDVD 6.")WinWaitActive("Key Activation.", "Please enter CD-Key to activate PowerDVD 6.")ControlSend ( "Key Activation.", "Please enter CD-Key to activate PowerDVD 6.", "Edit1", "xxxxx")ControlSend ( "Key Activation.", "Please enter CD-Key to activate PowerDVD 6.", "Edit2", "xxxxx")ControlSend ( "Key Activation.", "Please enter CD-Key to activate PowerDVD 6.", "Edit3", "xxxxx")ControlSend ( "Key Activation.", "Please enter CD-Key to activate PowerDVD 6.", "Edit4", "xxxxx")ControlSend ( "Key Activation.", "Please enter CD-Key to activate PowerDVD 6.", "Edit5", "xxxxx")ControlSend ( "Key Activation.", "Please enter CD-Key to activate PowerDVD 6.", "Edit6", "xxxxx")ControlClick("Key Activation.", "", "Button2")WinWaitActive("Activate now...")ControlClick("Activate now...", "", "Button1") Edited February 16, 2006 by knotten2 Link to comment Share on other sites More sharing options...
Developers Jos Posted February 16, 2006 Developers Share Posted February 16, 2006 While not WinExists("CyberLink PowerDVD Deluxe v6.0 Setup...", "A system with Pentium III 500 or") If WinExists("Question", "An existing version") Then ControlClick("Question", "", "Button1") EndIf If WinExists("Question", "Would you like to keep your personal settings for PowerDVD?") Then ControlClick("Question", "", "Button2") EndIf EndIf ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button1") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
jjohn Posted February 16, 2006 Share Posted February 16, 2006 May be try using runwait("PowerDVD6.exe") instead of run("PowerDVD6.exe"), and let the return @error it produce to decide whether the script get into the green block Link to comment Share on other sites More sharing options...
Developers Jos Posted February 16, 2006 Developers Share Posted February 16, 2006 May be try using runwait("PowerDVD6.exe") instead of run("PowerDVD6.exe"), and let the return @error it produce to decide whether the script get into the green blockI believe you are missing the point here... all the Winwait and ControlXXX commands perform the pointing and clicking to automate the installation of this software ..... The issue is that not all windows always appear.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
knotten2 Posted February 16, 2006 Author Share Posted February 16, 2006 (edited) [color=#33CC00]While not WinExists("CyberLink PowerDVD Deluxe v6.0 Setup...", "A system with Pentium III 500 or") If WinExists("Question", "An existing version") Then ControlClick("Question", "", "Button1")[/color] EndIf If WinExists("Question", "Would you like to keep your personal settings for PowerDVD?") Then ControlClick("Question", "", "Button2") EndIf EndIf ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup...", "", "Button1") While not WinExists("CyberLink PowerDVD Deluxe v6.0 The green part again. Can you pls. eksplain howe this works....."While not" :"> Yes I know it's basic...but that is on the level Iam.... Edited February 16, 2006 by knotten2 Link to comment Share on other sites More sharing options...
knotten2 Posted February 16, 2006 Author Share Posted February 16, 2006 (edited) May be try using runwait("PowerDVD6.exe") instead of run("PowerDVD6.exe"), and let the return @error it produce to decide whether the script get into the green blockI have tried that...no go....Iam tryng to avoid using "timing" in my script.It jumps from (1) to (2) hand stops, because the ("Question", window starts to late....I think.(1)If WinWaitActive("Question", "An existing version") ThenControlClick("Question", "", "Button1")WinWaitActive("Question", "Would you like to keep your personal settings for PowerDVD?") ControlClick("Question", "", "Button2")EndIf(2)WinWaitActive("CyberLink PowerDVD Deluxe v6.0 Setup...", "A system with Pentium III 500 or")ControlClick("CyberLink PowerDVD Deluxe v6.0 Setup Edited February 16, 2006 by knotten2 Link to comment Share on other sites More sharing options...
Developers Jos Posted February 16, 2006 Developers Share Posted February 16, 2006 (edited) While not WinExists("CyberLink PowerDVD Deluxe v6.0The green part again. Can you pls. eksplain howe this works....."While not" :"> Yes I know it's basic...but that is on the level Iam....The While ... Wend loop will be active till a window exists with WinExists("CyberLink PowerDVD Deluxe v6.0 Setup...", "A system with Pentium III 500 or")So when you say While Not Winexists() you say loop as long as the window does not exists.Hope that helps... Edited February 16, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
knotten2 Posted February 16, 2006 Author Share Posted February 16, 2006 The While ... Wend loop will be active till a window exists with WinExists("CyberLink PowerDVD Deluxe v6.0 Setup...", "A system with Pentium III 500 or")So when you say While Not Winexists() you say loop as long as the window does not exists.Hope that helps...Thanks, that was quick.I understand, great forum! Link to comment Share on other sites More sharing options...
knotten2 Posted February 16, 2006 Author Share Posted February 16, 2006 Thanks a lot. It works here too; While Not WinExists("Key Activation.", "Please enter CD-Key to activate PowerDVD 6.") If WinExists("CyberLink Registration", "") Then ControlClick("CyberLink Registration", "", "Button4") EndIf WEnd winactivate("Key Activation.", "Please enter CD-Key to activate PowerDVD 6.") Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now