smti Posted August 6, 2013 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!
FireFox Posted August 6, 2013 Posted August 6, 2013 Hi, You are using the wrong function, it should be ControlGetText() = "whatever". Take a look at the helpfile. Br, FireFox.
Belini Posted August 6, 2013 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
FireFox Posted August 6, 2013 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.
smti Posted August 6, 2013 Author 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.
FireFox Posted August 6, 2013 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
smti Posted August 8, 2013 Author 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?
FireFox Posted August 8, 2013 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.
water Posted August 8, 2013 Posted August 8, 2013 Doesn't the AV software have a silent install feature? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Moderators JLogan3o13 Posted August 8, 2013 Moderators 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!
water Posted August 8, 2013 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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