Sign in to follow this  
Followers 0
Docfxit

How to use Controlsend

10 posts in this topic

#1 ·  Posted (edited)

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

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

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

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.

 

1 person likes this

Share this post


Link to post
Share on other sites

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

 

1 person likes this

Share this post


Link to post
Share on other sites

That works super.

Thank you very much,

Docfxit

Share this post


Link to post
Share on other sites

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  
Followers 0