johnlocke Posted April 30, 2007 Share Posted April 30, 2007 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 30, 2007 Share Posted April 30, 2007 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 Link to comment Share on other sites More sharing options...
johnlocke Posted April 30, 2007 Author Share Posted April 30, 2007 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 Link to comment Share on other sites More sharing options...
johnlocke Posted May 2, 2007 Author Share Posted May 2, 2007 this worked great - many thanks 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