Jump to content
Sign in to follow this  
Docfxit

How to use Controlsend

Recommended Posts

Docfxit
ControlSend("Internet Protocol Version 4 (TCP/IPv4) Properties", '', '&IP address:', '1921681688' & '{TAB}')

I would like to learn how to use ControlSend.

SettingsAutoItInfo.jpegSettingsNetwork.jpeg

Win7 Ultimate 32vit

 

Thanks,

Docfxit

Edited by Docfxit
Added Clips

Share this post


Link to post
Share on other sites
Docfxit

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

Thanks,

Docfxit

Share this post


Link to post
Share on other sites
mpower
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

Share this post


Link to post
Share on other sites
Docfxit

Yes.  I would like the ControlSend to replace the numbers for the IP address. 

Thanks,

Docfxit

Share this post


Link to post
Share on other sites
MichaelHB

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.

 

  • Like 1

Share this post


Link to post
Share on other sites
Docfxit

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

Share this post


Link to post
Share on other sites
Synapsee
$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

 

  • Like 1

Share this post


Link to post
Share on other sites
Docfxit

That works super.

Thank you very much,

Docfxit

Share this post


Link to post
Share on other sites
MichaelHB

Glad to know that helped. :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.