Sign in to follow this  
Followers 0
eaglekaiser

Searching in a window

5 posts in this topic

Hi,

Some windows in W2K or XP contain information that is not saved in a file or in the registry (Network Configuration)

Assuming I want to change automatically the IP Address of the first DNS Server, I need to go over some windows where I must choose an option in a normal list (ex.: Internet protocol (TCP/IP) to have access to the properties).

Therefore I want to do this:

- search for the string "Internet protocol (TCP/IP)" in that window

- determine the position of that string to select the option

- clicking on the button "Properties" to show the properties-window

I'm searching for a while after the correct solution. Can anyone help me with this one ?

Many thanks,

Eaglekaiser :)

Share this post


Link to post
Share on other sites



No idea what window, but if it is searchable, you can use find and then maybe the WinGetCaretPos ( ) function.

If not searchable, you might be able to use the control functions if they are standard windows controls (like imput boxes or dropdowns.) Use AutoIt window spy to grab the class name.

You could have your mouse drag over the text, send a control c, compare the clipboard, etc, but sounds like a nightmare to me.

OCR is a last option and I don't recomend it.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Hi,

Some windows in W2K or XP contain information that is not saved in a file or in the registry (Network Configuration)

Assuming I want to change automatically the IP Address of the first DNS Server, I need to go over some windows where I must choose an option in a normal list (ex.: Internet protocol (TCP/IP) to have access to the properties).

Therefore I want to do this:

- search for the string "Internet protocol (TCP/IP)" in that window

- determine the position of that string to select the option

- clicking on the button "Properties" to show the properties-window

I'm searching for a while after the correct solution. Can anyone help me with this one ?

Many thanks,

Eaglekaiser :)

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites

Many thanks for the replies guys :)

EagleKaiser

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