smti Posted August 6, 2013 Share Posted August 6, 2013 Hi Everyone: I am attempting to automate the installation of an AV application. In doing so, I am trying to determine whether or not text is visible on the screen. This is what I have tried: Do If WinGetText("[CLASS:Static; INSTANCE:27]", "Congratulations! YOU ROCK!") $InstallComplete = 1 MsgBox(4096, "Message!", "Control is active!", 10) Sleep(30000) Else $InstallComplete = 0 MsgBox(4096, "Message!", "Control is NOT active!", 10) Sleep(30000) EndIf Until $InstallComplete = 1 Even when the control is not visible -- namely the text is not being displayed, a message box still pops-up and indicates that the control is active. Any help on how to fix this, or other possible solutions would be greatly and most appreciated! Thank you! Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 Hi, You are using the wrong function, it should be ControlGetText() = "whatever". Take a look at the helpfile. Br, FireFox. Link to comment Share on other sites More sharing options...
Belini Posted August 6, 2013 Share Posted August 6, 2013 can use SplashTextOn Do If WinGetText("[CLASS:Static; INSTANCE:27]", "Congratulations! YOU ROCK!") Then $InstallComplete = 1 SplashTextOn("OK", "Control is active!", 270, 50, -1, -1, 1, "", 18) ;MsgBox(4096, "Message!", "Control is active!", 10) Sleep(30000) Else $InstallComplete = 0 SplashTextOn("OK", "Control is NOT active!", 270, 50, -1, -1, 1, "", 18) ;MsgBox(4096, "Message!", "Control is NOT active!", 10) Sleep(30000) EndIf Until $InstallComplete = 1 My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 This code is perfectly normal to your eyes : WinGetText("[CLASS:Static; INSTANCE:27]", "Congratulations! YOU ROCK!") It should tilt in your head. Link to comment Share on other sites More sharing options...
smti Posted August 6, 2013 Author Share Posted August 6, 2013 I also tried this: Do $FinalScreen = ControlCommand("VIPRE Antivirus 2012", "Congratulations! YOU ROCK!","1077","IsVisible") If ($FinalScreen) = 1 Then MsgBox(4096, "Message!", "On Final screen!", 10) $InstallComplete = 1 Sleep(30000) Else MsgBox(4096, "Message!", "Not on final screen yet!", 10) $InstallComplete = 0 Sleep(30000) EndIf Until $InstallComplete = 1 Using the ControlCommand, but that did not seem to work either. Ugh. Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 (edited) Try this :$FinalScreen = ControlCommand("VIPRE Antivirus 2012", "", "[ID:1077]", "IsVisible")Btw: You should you the ControlNN format instead of the ID which may change.Br, FireFox. Edited August 6, 2013 by FireFox Link to comment Share on other sites More sharing options...
smti Posted August 8, 2013 Author Share Posted August 8, 2013 If I wanted to click the button that I am looking for (in the same window) could I do this: ControlClick("VIPRE Antivirius 2012","","[ID:1077]") Assuming that 1077 is the control ID? Should I also use WinWaitActrivate to ensure the window is active? Link to comment Share on other sites More sharing options...
FireFox Posted August 8, 2013 Share Posted August 8, 2013 Assuming that 1077 is the control ID?Yes.Should I also use WinWaitActrivate to ensure the window is active?No, you don't need to activate the window if you use the Control* functions.Br, FireFox. Link to comment Share on other sites More sharing options...
water Posted August 8, 2013 Share Posted August 8, 2013 Doesn't the AV software have a silent install feature? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 8, 2013 Moderators Share Posted August 8, 2013 Most every AV company provides a silent install. And why would the text of the AV window be "Congrats! YOU ROCK!"? "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...
water Posted August 8, 2013 Share Posted August 8, 2013 According to Google it should be something like this: AgentInstaller-SITE-NAME-Workstations-General-EN.MSI /q /qn /promptrestart My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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