Jump to content

Need Help On Changing Text


Recommended Posts

I have a little problem. I need to script the changing of ip addresses for network cards using a spcific utility called "PE Network configurator". I have to use this program because it is "accepted" by my office. The problem I am having is that the textboxes are not normal. You will see what I mean if you download the program from here:

http://www.geocities.com/pierremounir/

When I run au3 spy, it shows the periods inbetween the fields, but not the ip addresses typed in. However, it shows the text at the bottom of the window in "all text" How can I enter text into something I cannot see?

Who else would I be?
Link to comment
Share on other sites

Times like these call for regular old Send:

$program = "C:\PENetCfg.exe"
$title = "PE Network Configurator"

If Not WinExists($title) Then
    Run($program)
Else  
    WinActivate($title)
EndIf

WinWaitActive($title)
Send("{Tab 3}")
Send("1921680.1")
Send("{Tab}")
Send("2552550.0")
Send("{Tab}")

Note: If any IP octet contains three digits, omit the dot following it.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Update: that worked!!! on the other hand, I have another problem. I need to find out what the original ip's are, save that info to an ini file and then set it back to original after I am done. Where do I "Read" this information from?

EDIT: Better yet, is there a way to enumerate all controls and their values in a specific window with autoit to find which control to use on my own? <== Don't you just love run-on sentences?

EDIT EDIT: Shock and amazement, it can work with regular controlsettext and controlgettext too... :D Thanks for all your help guys.

Edited by this-is-me
Who else would I be?
Link to comment
Share on other sites

Update: that worked!!! on the other hand, I have another problem. I need to find out what the original ip's are, save that info to an ini file and then set it back to original after I am done. Where do I "Read" this information from?

Look up @IPAddress1, @IPAddress2, etc in the help file "Macro Reference" section.

You can also get the information on Windows 2000/XP by running ipconfig and parsing the results. I think you will find an example if you search the forums.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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...