zaekeon Posted December 23, 2008 Share Posted December 23, 2008 I am trying to write a script that when you are on a LAN Connection's properties page (where you see all the microsoft client, ipv4, ipv6 properties) I need to make my script select a specific item and uinstall it, I'm fine with sending keystrokes, however not every pc might have the same items in this list, is there any way to detect the text of the item selected in that box? from looking at it i might be able to use the window text as when you select differnt items in the list, different window text is visible via auto window info tool, but i'm not sure how to write a function that could check to see if the current windows text contains a certain string (ie: contains the string but not an exact match of all of the visible text) Link to comment Share on other sites More sharing options...
zaekeon Posted December 24, 2008 Author Share Posted December 24, 2008 nevermind, i think i got it: winwaitactive("Local Area Connection Properties") $testvar = WinGetText("Local Area Connection Properties") $i = 0 $swindowtext = "Allows your computer to" msgbox(0,"text read was:",$testvar);debugging purposes Do if stringinstr ($testvar, $swindowtext) = 0 then send("{DOWN}") Else $i = 1 EndIf Until $i = 1 msgbox(0,"Found string") which should work for what i want, anyone know what to do, but does anyone have any pointers for detecting text in situations like that? for example if i wanted to make a script that started add/remove programs and selected a particular program and then click remove? or is that a little out of the scope of what we can do here. 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