Jump to content

Looking for text


smti
 Share

Recommended Posts

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

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
Link to comment
Share on other sites

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

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

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

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 - 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 (NEW 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

 

Link to comment
Share on other sites

  • Moderators

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

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 - 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 (NEW 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

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...