DanteMay Posted November 9, 2016 Share Posted November 9, 2016 Good day/night guys First of all: sorry for my bad english I try to write a script to install odbc driver for IBM updates. The first steps are ready but there is big problem: after the first few screens (script works fine) come some screens with progress bars which automatically close. The next screen is window with 'next' and 'cancel' again. At this step doesnt work the script. Is there a command for ...uhm.... bridging? i mean the screens between picture 1 (namend 1 :D) and picture 2 (namend 2 :D) jesus....this english is terrible... Link to comment Share on other sites More sharing options...
jaeger52 Posted November 9, 2016 Share Posted November 9, 2016 Hi DanteMay, and welcome to the forum. I would guess that your script is running into window focus issues, but it would be really helpful if you could post your code so that we could have a look at it. I'm pretty sure you can fix this with the right combination of WinWait commands, but I'll need to see your script to be able to offer any constructive help. Link to comment Share on other sites More sharing options...
DanteMay Posted November 9, 2016 Author Share Posted November 9, 2016 Run("cwblaunch.exe") WinWait("Setup-Sprache auswählen", "Wählen Sie die Sprache") WinActivate("Setup-Sprache auswählen", "Wählen Sie die Sprache") ControlClick("Setup-Sprache auswählen", "Wählen Sie die Sprache", "OK", "left") ;<--at this point is the problem WinWait("IBM i Access für Windows 7.1 - InstallShield Wizard", "Der InstallShield(R) Wizard wird IBM i Access") WinActivate("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access") ControlClick("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access", 1, "left") WinWait("IBM i Access", "Lizenzvereinbarung") WinActivate("IBM i Access", "Lizenzvereinbarung") ControlSend("IBM i Access", "Lizenzvereinbarung", 1032, "{UP}" & "{Space}") ControlClick("IBM i Access", "Lizenzvereinbarung", "Weiter", "left") WinWait("IBM i Access", "Zielordner") WinActivate("IBM i Access", "Zielordner") ControlClick("IBM i Access", "Zielordner", "Weiter", "left") WinWait("IBM i Access", "Primärsprache") WinActivate("IBM i Access", "Primärsprache") ControlClick("IBM i Access", "Primärsprache", "Weiter", "left") WinWait("IBM i Access", "Setuptyp") WinActivate("IBM i Access", "Setuptyp") ControlSend("IBM i Access", "Setuptyp", 1032, "{DOWN}" & "{Space}") ControlClick("IBM i Access", "Setuptyp", "Weiter", "left") WinWait("IBM i Access", "Eingeschränkte Features") WinActivate("IBM i Access", "Eingeschränkte Features") ControlClick("IBM i Access", "Eingeschränkte Features", "Weiter", "left") WinWait("IBM i Access", "Setup") WinActivate("IBM i Access", "Setup") ControlSend("IBM i Access", "Setup", 1032, "{DOWN 3}" & "{Space}") ControlSend("IBM i Access", "Setup", 1032, "{DOWN 3}" & "{Space}") ControlClick("IBM i Access", "Setup", "Weiter", "left") WinWait("IBM i Access", "Programm zu installieren") WinActivate("IBM i Access", "Programm zu installieren") ControlClick("IBM i Access", "Programm zu installieren", "Installieren", "left") WinWait("IBM i Access", "abgeschlossen") WinActivate("IBM i Access", "abgeschlossen") ControlClick("IBM i Access", "abgeschlossen", "Fertigstellen", "left") dont blame me i've started today with this script language Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 9, 2016 Moderators Share Posted November 9, 2016 @DanteMay the driver is written in InstallShield, which means it supports command line parameters to install it silently. I believe 7.1 supports the /S and /V switches, which will keep you from having to manipulate the GUI. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
DanteMay Posted November 9, 2016 Author Share Posted November 9, 2016 My first idea was a batch file. But this isnt a full install rather a custom install....this was the breakpoint. I was too stupid for this . The complete install works great as a batch file with /s and /v but this wasn't the task. Can i use these parameters in AutoIt and can install as a custom install? Link to comment Share on other sites More sharing options...
DanteMay Posted November 9, 2016 Author Share Posted November 9, 2016 9 minutes ago, DanteMay said: But this isnt a full install rather a custom install But this shouldn't be full install.... where is the edit button? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 9, 2016 Moderators Share Posted November 9, 2016 Yes you can use those parameters in AutoIt. Use ShellExecute: ShellExecuteWait(<path to executable>, '/S') "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
DanteMay Posted November 9, 2016 Author Share Posted November 9, 2016 works this like a silent installation? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 9, 2016 Moderators Share Posted November 9, 2016 @DanteMay it would probably take you less time to try it yourself than it does to post the question Have you tried the suggestion given? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
DanteMay Posted November 9, 2016 Author Share Posted November 9, 2016 i can't try this yet^^ the programm files are on work and im at home^^ i will test it tomorrow. thanks until here Link to comment Share on other sites More sharing options...
DanteMay Posted November 10, 2016 Author Share Posted November 10, 2016 I am back! uhm...SchellExecuteWait doesn't work. Same probleme like before: after the 'select language'-screen come progress bars and in the next screen it stopped. I've tried several parts: 1. I had run the script with only ShellExecuteWait("cwblaunch.exe", '/S') 2. I had run the command after run Run("cwblaunch.exe") ShellExecuteWait("cwblaunch.exe", '/S') WinWait("Setup-Sprache auswählen", "Wählen Sie die Sprache") WinActivate("Setup-Sprache auswählen", "Wählen Sie die Sprache") ControlClick("Setup-Sprache auswählen", "Wählen Sie die Sprache", "OK", "left") WinWait("IBM i Access für Windows 7.1 - InstallShield Wizard", "Der InstallShield(R) Wizard wird IBM i Access") WinActivate("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access") ControlClick("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access", 1, "left") WinWait("IBM i Access", "Lizenzvereinbarung") [...] (why is blue and red so rnd? :D) I thought ShellExecuteWait took over the part of run, so i came to the next... 3. I had run the command at first ShellExecuteWait("cwblaunch.exe", '/S') WinWait("IBM i Access für Windows 7.1 - InstallShield Wizard", "Der InstallShield(R) Wizard wird IBM i Access") WinActivate("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access") ControlClick("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access", 1, "left") WinWait("IBM i Access", "Lizenzvereinbarung") [...] i feel a little bit silly... Link to comment Share on other sites More sharing options...
DanteMay Posted November 10, 2016 Author Share Posted November 10, 2016 (I haven't found the edit button yet...pls help :/) How does 'WinWait' works? Is it really wait until the Window is open with the paramter or is this like batch aka "I will work row for row. i don't care if the process ready yet." Link to comment Share on other sites More sharing options...
232showtime Posted November 10, 2016 Share Posted November 10, 2016 check the help file in autoit for winwait and controlclick. 6 hours ago, DanteMay said: ControlClick("Setup-Sprache auswählen", "Wählen Sie die Sprache", "OK", "left") ControlClick should be like this ControlClick ( "MyProgram", "", "[CLASS:Button; INSTANCE:4]","left", 1) use the AutoIt Window Info for ControlID ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
DanteMay Posted November 11, 2016 Author Share Posted November 11, 2016 (edited) Finaly the script works. but i haven't use the class:button thingy rather the normal ID example: ControlClick("title", "text", 25309, "left") Thanks a lot edit: YESSS finaly I have an edit button :3 Edited November 11, 2016 by DanteMay 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