Earthshine Posted December 8, 2017 Posted December 8, 2017 Hey, @CodingMonkey81, can you put SOLVED in the title of your thread so other users know it's solved and how to solve it should they have the same issue. The day you posted this, I had helped someone UN install msi apps in the same manner. My resources are limited. You must ask the right questions
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 (edited) 3 minutes ago, Earthshine said: Hey, @CodingMonkey81, can you put SOLVED in the title of your thread so other users know it's solved and how to solve it should they have the same issue. The day you posted this, I had helped someone UN install msi apps in the same manner. I added a tag that it was solved but I don't know how to edit the title of this thread. Edited December 8, 2017 by CodingMonkey81 Earthshine 1
careca Posted December 8, 2017 Posted December 8, 2017 edit 1st post... Earthshine 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 (edited) 20 minutes ago, Earthshine said: Hey, @CodingMonkey81, can you put SOLVED in the title of your thread so other users know it's solved and how to solve it should they have the same issue. The day you posted this, I had helped someone UN install msi apps in the same manner. Quick question, slightly related (and if it needs a new topic I'll start one); after the installer comes up I'm trying to move it to the next screen without any luck: #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Local $aArray = _FileListToArray("D:\Path\To\File", 'StaticFileName*.msi', Default, True) _ArraySort($aArray, 1) ; sorts descending, latest version on top at element 0 ;_ArrayDisplay ($aArray) Local $str = "msiexec /i """ & $aArray[0] & """" ConsoleWrite($str) RunWait($str) Sleep(5000) WinWaitActive("Window Title", "Window Text", 0) Send("!N") I put the sleep command in because just jumping right to the WinWaitActive wasn't working. If I manually run the msi file and then issue the last two commands (in it's own file) they function properly. Is there something more I need to do (because of the scripting before it)? Edited December 8, 2017 by CodingMonkey81
Earthshine Posted December 8, 2017 Posted December 8, 2017 (edited) you are not waiting for the right windows. you need to supply the title of that MSI installer and the text on the title bar. your WaitWinActive needs to change WaitWinActive ("[CLASS:#32770]", "Some MSI Setup Title") Your installer's class is usually a windows dialog is [CLASS:#32770] and that is what Edited December 8, 2017 by Earthshine My resources are limited. You must ask the right questions
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 (edited) 9 minutes ago, Earthshine said: you are not waiting for the right windows. you need to supply the title of that MSI installer and the text on the title bar. and then send ALT N Send("{ALT}n"} something like that When I use the AutoIt Windows Info it shows me the Title Value (which I'm using) and the visible text (which I'm also using). If I create a new AutoIt file and run the last two commands they run successfully once the window is in focus (when I run the msi manually). If I then put that at the end of the full script (above) it doesn't run at all. I've used the WinWaitActive in the past and I'm a little rusty but this command I do have some experience with Thanks! Edit: I see the issue with where you think I'm going wrong. I've sanitized the Window Title and Window text as to not reveal the application and to protect the company I work for. I can tell you that I do have the Window Title and Window Text correct in the code with information from the AutoIt Windows Info utility. Edited December 8, 2017 by CodingMonkey81 Clarification as to Window Title/Text info
Earthshine Posted December 8, 2017 Posted December 8, 2017 (edited) 10 minutes ago, Earthshine said: you are not waiting for the right windows. you need to supply the title of that MSI installer and the text on the title bar. your WaitWinActive needs to change WaitWinActive ("[CLASS:#32770]", "Some MSI Setup Title") Your installer's class is usually a windows dialog is [CLASS:#32770] and that is what so set the text correctly for your installer too and that should work, then your send should work but I have a better way.... Edited December 8, 2017 by Earthshine My resources are limited. You must ask the right questions
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 2 minutes ago, Earthshine said: so set the text correctly for your installer too and that should work, then your send should work but I have a better way.... I've got the right info in; I sanatized the info in the above script to protect the application I'm installing. I've not had to use the installer's class in the past when using WinWaitActive but just the windows and text from the installer dialog box; is this a new requirement? I guess where I'm confused is that if I manually run the msi file and then issue the WinWaitActive command (with the correct window information) it works and advances to the next window. If I then take that same code and put if after the autoit code that runs the msi file it doesn't work. I've no idea why it would work on it's own but not after additional code.
careca Posted December 8, 2017 Posted December 8, 2017 Experiment with Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Earthshine 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 4 minutes ago, careca said: Experiment with Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase I can, though I wonder why just good old "WinWaitActive" doesn't work when it's a part of the larger script but does on its own.
Earthshine Posted December 8, 2017 Posted December 8, 2017 I just use WinWait My resources are limited. You must ask the right questions
Earthshine Posted December 8, 2017 Posted December 8, 2017 (edited) Increase your sleep time to 10 seconds. This is precisely why I don’t use sleep in the way that most people use it I wait dynamically Edited December 8, 2017 by Earthshine My resources are limited. You must ask the right questions
careca Posted December 8, 2017 Posted December 8, 2017 I'd try to leave the text part out of it, leave only the title, try with handle, with class, and the opt variations. Earthshine 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 (edited) 16 minutes ago, careca said: I'd try to leave the text part out of it, leave only the title, try with handle, with class, and the opt variations. FIgured it out! Instead of using "RunWait($str)" I used "Run($str)". As I recall, RunWait waits for the program called by AutoIT to terminate before sending additional commands. Edited December 8, 2017 by CodingMonkey81 Earthshine 1
Earthshine Posted December 8, 2017 Posted December 8, 2017 (edited) Excellent I knew you could do it!! Also yes, I use run wait because we were doing a quiet before You have just experienced, firsthand, code development in an iterative cycle. This is how you do it. Script and test it script it and test it Edited December 8, 2017 by Earthshine My resources are limited. You must ask the right questions
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 1 minute ago, Earthshine said: Excellent I knew you could do it!! Also yes, I use run wait because we were doing a quiet before Thanks again for everything and glad I could "catch" one on my own. Earthshine 1
Earthshine Posted December 8, 2017 Posted December 8, 2017 (edited) Indeed sir, it feels good Pat yourself on the back go have a beer. Message me if you want a much more robust and reliable way to do things like this Edited December 8, 2017 by Earthshine My resources are limited. You must ask the right questions
careca Posted December 8, 2017 Posted December 8, 2017 Damn how could i miss that wait? Sometimes it's the most In-your-face stuff that gets you. Earthshine 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 20 minutes ago, Earthshine said: Indeed sir, it feels good Pat yourself on the back go have a beer Yes sir. Earthshine 1
CodingMonkey81 Posted December 8, 2017 Author Posted December 8, 2017 6 minutes ago, careca said: Damn how could i miss that wait? Sometimes it's the most In-your-face stuff that gets you. Believe me, I've been there before. Chalk it up to being late in the day on a Friday. Earthshine 1
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