Sign in to follow this  
Followers 0
johnlocke

If statement on "Visible Window Text"

4 posts in this topic

Hi

I've managed to script a fairly useful tool for dealing with windows (2k) network password boxes. However, I need to refine it so that it only enters certain information for certain password boxes.

Can anyone tell me how to write a conditional statement when the "Visible Window Text" properties are as follows:

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

Please type your user name and password.

Firewall:

proxy.internet.point

Realm

&User Name

&Password

&Save this password in your password list

OK

Cancel

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

many thanks

Share this post


Link to post
Share on other sites



Maybe:

$sWinText = WinGetText("Logon Window", "")
If StringInStr($sWinText, "Please type your user name and password") And StringInStr($sWinText, "Firewall:") And _
    StringInStr($sWinText, "proxy.internet.point") And StringInStr($sWinText, "Realm") Then
    ; Do something special...
    $a = $b
EndIf

Tweak the string checks to be a specific as you need.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Maybe:

$sWinText = WinGetText("Logon Window", "")
If StringInStr($sWinText, "Please type your user name and password") And StringInStr($sWinText, "Firewall:") And _
    StringInStr($sWinText, "proxy.internet.point") And StringInStr($sWinText, "Realm") Then
    ; Do something special...
    $a = $b
EndIf

Tweak the string checks to be a specific as you need.

:)

thanks I'll give this a try and let you know how it goes

Share this post


Link to post
Share on other sites

this worked great - many thanks

Share this post


Link to post
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
Sign in to follow this  
Followers 0