Welly Posted July 16, 2015 Share Posted July 16, 2015 Hi all,I'm new to AutoIt so please bear with me.I'm using this to automate a software update installation on multiple clients.This is the code I'm having problem with : $win = WinWait( $varGL_InstallerTitleText, "Installation completed successfully" ) ControlClick( $win , "Installation completed successfully" , "[NAME:m_cancel]" ) The issue is that is that is final state in the update window and somehow there's two possibilities for the text. It can be "Installation completed successfully" or it can be "Installation completed", depends on what component is updated. I'm reluctant to put a timeout delay because before we got to that final state there's an update process which I'm not sure how long it takes (depending on the spec of the client, which is vary).Any suggestions on how to approach this? Thanks heaps.Welly Link to comment Share on other sites More sharing options...
hydranix Posted July 16, 2015 Share Posted July 16, 2015 (edited) There is a very complete help file that answers this question. -------8<--------If the same notepad window had, "This is some text!" typed into the window, the Window Info Tool would show: -------8<--------WinWaitActive("Untitled - Notepad", "This is some text!")Window TextThe window text consists of all the text that AutoIt can "see". This will usually be things like the contents of edit controls (as above with "This is some text!") but will also include other text like:Button text like &Yes, &No, &Next (the & indicates an underlined letter)Dialog text like "Are you sure you wish to continue?"Control textMisc text - sometimes you don't know what it is The important thing is that you can use the text along with the title to uniquely identify a window to work with.When you specify the text parameter in a window function it is treated as a substring. So for the example above if you used the text "is some " you would get a match. What has been described is the default mode in which AutoIt operates. There are a number of more advanced modes to use when things are not as simple as this. Note: Hidden windows can be matched by "title" only if "text" is empty ("").Source Edited July 16, 2015 by hydranix Link to comment Share on other sites More sharing options...
Exit Posted July 16, 2015 Share Posted July 16, 2015 Just use start of text$win = WinWait( $varGL_InstallerTitleText, "Installation compl" ) App: Au3toCmd UDF: _SingleScript() 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