Home > Software engineering >  Routers break code
Routers break code

Time:09-26

TP cc-link routers, think through VB break line, in order to achieve the purpose of changing IP, have superior provides a train of thought or code?

CodePudding user response:

Can use webbrowser control

Automatic landing and then select restart router or disconnect router button

The webbrowser click on the button code
WebBrowser1. Document. GetElementsByName (" the name of the button ") (0). Click

CodePudding user response:

Fyi:
 if "% 1"=="l" goto l 
If "% 1"=="w" goto w
Echo network address switch batch
Echo setip l - switch to the local connection
Echo setip w - switch to the wireless network connection
Goto e

: l
Echo switch from static IP wireless network to the wired network static IP:
Netsh interface IP set the DHCP address wireless network connection
Netsh interface DHCP IP set the DNS wireless network connection
Netsh interface IP set address local connection static 192.168.1.111 255.255.252.0 192.168.2.1 1
Netsh interface IP set DNS local connection static 202.106.196.115
Goto e

: w
Echo from static IP switch to the wired network infinite network static IP:
Netsh interface IP set address local connection DHCP
Netsh interface IP set DNS local connection DHCP
Netsh interface IP set static address wireless network connection 192.168.1.5 255.255.255.0 192.168.1.1 1
Netsh interface IP set DNS wireless network connection static 211.97.168.129
Goto e

E

CodePudding user response:

reference 1st floor aspower_ response:

can use webbrowser control
Automatic landing and then select restart router or disconnect router button

The webbrowser click on the button code
WebBrowser1. Document. GetElementsByName (" the name of the button ") (0). Click


The disconnect it "button" is a bit different, no matter use, you see is that so?





CodePudding user response:

reference zhao4zhong1 reply: 3/f
are for reference only:
 if "% 1"=="l" goto l 
If "% 1"=="w" goto w
Echo network address switch batch
Echo setip l - switch to the local connection
Echo setip w - switch to the wireless network connection
Goto e

: l
Echo switch from static IP wireless network to the wired network static IP:
Netsh interface IP set the DHCP address wireless network connection
Netsh interface DHCP IP set the DNS wireless network connection
Netsh interface IP set address local connection static 192.168.1.111 255.255.252.0 192.168.2.1 1
Netsh interface IP set DNS local connection static 202.106.196.115
Goto e

: w
Echo from static IP switch to the wired network infinite network static IP:
Netsh interface IP set address local connection DHCP
Netsh interface IP set DNS local connection DHCP
Netsh interface IP set static address wireless network connection 192.168.1.5 255.255.255.0 192.168.1.1 1
Netsh interface IP set DNS wireless network connection static 211.97.168.129
Goto e

E


Depressed, look not to understand, thank you.

CodePudding user response:

Learning how to learn what is called a batch.

CodePudding user response:

refer to 6th floor zhao4zhong1 response:
the building learning how to learn what is called a batch,


For batch only know a little, my purpose is to want to click on the "disconnect" to change the IP, because after the break to judge whether the IP is you need, the batch is what all don't like break line,

I'm not about to "disconnect", but the router break line, let the router redial, achieve in IP,

CodePudding user response:

refer to 7th floor myywf response:
Quote: refer to the sixth floor zhao4zhong1 response:

The building Lord learning how to learn what is called a batch,


For batch only know a little, my purpose is to want to click on the "disconnect" to change the IP, because after the break to judge whether the IP is you need, the batch is what all don't like break line,

I'm not about to "disconnect", but the router break line, let the router redial, achieve in IP,


His should be to control the machine set IP, is he understand wrong, wrong if routing is one such as you remove the routing directly, and then control dial and bolt is good, if must route, then use 1/f, control elements, specific name or id of element analysis, we can't see you on the other side of the page, method is the dom object model, reference: http://www.w3school.com.cn/htmldom/dom_methods.asp

CodePudding user response:

refer to 7th floor myywf response:
Quote: refer to the sixth floor zhao4zhong1 response:

The building Lord learning how to learn what is called a batch,


For batch only know a little, my purpose is to want to click on the "disconnect" to change the IP, because after the break to judge whether the IP is you need, the batch is what all don't like break line,

I'm not about to "disconnect", but the router break line, let the router redial, achieve in IP,


He knows a fart ah, CSDN the uneducated person, you ask him?
You have to redial ASDLd, you can use my way to
Of course I have the code is a demo, specific code is to look at your web page content
You said your router's model under the
Or you open your router and then disconnect point right that page, check the source code, and then the disconnect button that came up with a piece of code,
I will give you a look.

CodePudding user response:

references 9 f aspower_ response:

He knows a fart ah, CSDN the uneducated person, you ask him?
You have to redial ASDLd, you can use my way to
Of course I have the code is a demo, specific code is to look at your web page content
You said your router's model under the
Or you open your router and then disconnect point right that page, check the source code, and then the disconnect button that came up with a piece of code,
I give you a look.


First thanks, below is the router's broken links, in IE address bar enter this link can be disconnected, but not in VB browser (refresh action, but constantly),
WebBrowser2. Navigate "http://192.168.1.1/userRpm/StatusRpm.htm? Disconnect=broken line & amp; Wan=1
"Models is below the red part, try the following code cannot achieve disconnect:
WebBrowser2. Document. GetElementByTagName (" Disconnect "). Click the button to submit the form Click 'simulation
WebBrowser2. Document. GetElementsById (" A ") (0). Click

Below is the analysis of the "disconnect" point,

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related