Jump to content

How to use Controlsend


Recommended Posts

Just now, Docfxit said:

Thanks,  I've seen that.  I can't figure out what goes where.

Thanks,

Docfxit

What specifically are you wanting to do? 

You can't ask such a general question and expect a response that is beyond my first post.

Do you want to be able to fill out the IP settings is that what the question is?

Cheers

Link to comment
Share on other sites

Docfxit,

They suggested you a better way to accomplish what you want.

But if you insist, try this:

$hWnd = WinGetHandle("Internet Protocol Version 4 (TCP/IPv4) Properties")
ControlCommand($hWnd, "", "Button3", "Check", "") ; this will select the radio button "Use the following IP address"
Sleep(200)
ControlSetText($hWnd, "", "SysIPAddress321", '28.255.28.255') ;this will set the IP address.

 

Link to comment
Share on other sites

  • 2 weeks later...

Thank you very much for the example.

Yours works just fine.

Mine doesn't work.

$hWnd = WinGetHandle("Internet Protocol Version 4 (TCP/IPv4) Properties")
    ControlCommand($hWnd, "", "Button3", "Check", "") ; this will select the radio button "Use the following IP address"
    Sleep(200)
    ControlSetText($hWnd, "", "SysIPAddress321", '192.168.168.8') ;this will set the IP address.
    ControlSetText($hWnd, "", "SysIPAddress322", '255.255.255.0') ;this will set the IP address.
    ControlSetText($hWnd, "", "SysIPAddress323", '192.168.168.168') ;this will set the IP address.
    ControlSetText($hWnd, "", "SysIPAddress324", '66.51.205.101') ;this will set the IP address.
    ControlSetText($hWnd, "", "SysIPAddress325", '66.51.206.101') ;this will set the IP address.
    WinClose($hWnd)
    Exit

Do you have any idea what I am doing wrong?

Thanks,

Docfxit

Link to comment
Share on other sites

$hWnd = WinGetHandle("Internet Protocol Version 4 (TCP/IPv4) Properties")
    ControlCommand($hWnd, "", "Button3", "Check", "") ; this will select the radio button "Use the following IP address"
    Sleep(200)
    ControlSetText($hWnd, "", "SysIPAddress321", '192.168.168.8') ;this will set the IP address.
    ControlSetText($hWnd, "", "SysIPAddress322", '255.255.255.0') ;this will set the IP address.
    ControlSetText($hWnd, "", "SysIPAddress323", '192.168.168.168') ;this will set the IP address.
    ControlSetText($hWnd, "", "SysIPAddress324", '66.51.205.101') ;this will set the IP address.
    ControlSetText($hWnd, "", "SysIPAddress325", '66.51.206.101') ;this will set the IP address.
    ControlClick($hWnd, "", "Button9")
    Exit

 

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...