China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-04 12:32
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] How to implement ADSL connection in batch processing View 2,437 Replies 15
Original Poster Posted 2007-04-25 06:43 ·  中国 浙江 金华 电信
初级用户
Credits 20
Posts 8
Joined 2007-04-25 06:13
19-year member
UID 86387
Gender Male
From 浙江
Status Offline
─────────────────── Moderation Record ────────────────────
Performer: lxmxn
Original Title: Please Come in, Batch Processing Experts
Description: The title is too vague, which is not convenient for forum search and management. Please modify the title within three days.
Prompt: To modify the title, click Edit at the bottom right of the current post, and then click Edit Post after modification.
Punishment: Since it is a new forum user, no punishment is temporarily given; if the title is not modified after three days, 2 points will be deducted as punishment, and the moderator will forcefully modify the title. Please click here to read the forum posting regulations to avoid posting violations in future discussions.
─────────────────── Moderation Record ────────────────────

Hello, experts..
ADSL connection in batch processing code
I want to make a small batch processing file. Please, experts, can you send me a section of code according to my steps. Thank you here.
Steps: 1. Open the browser, path D:/maxthon.exe
2. Open the ADSL connection
3. Open the specified web pages (http://www.126.com and http://www.163.com and www.sina.com.cn)
4. Close the specified web pages
5. Disconnect the ADSL connection
(Note: Repeat the operation of "2——5" 1000 times and then end)

[ Last edited by cares on 2007-4-25 at 01:23 PM ]
Floor 2 Posted 2007-04-25 07:56 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
As far as I know, batch processing cannot close the built-in web page of Maxthon, only the Maxthon.exe process. So if it has to be done according to your requirements, it is estimated that the code cannot be written.
Floor 3 Posted 2007-04-27 02:08 ·  中国 浙江 金华 电信
初级用户
Credits 20
Posts 8
Joined 2007-04-25 06:13
19-year member
UID 86387
Gender Male
From 浙江
Status Offline
Oh no... Then what should we do??
Floor 4 Posted 2007-04-27 05:06 ·  中国 广东 佛山 电信
新手上路
Credits 6
Posts 4
Joined 2006-10-19 09:42
19-year member
UID 66847
Status Offline
Using Maxthon, if you open the same web page each time, you can consider treating the opened web page as a shortcut group and just close Maxthon directly
Floor 5 Posted 2007-04-28 01:40 ·  中国 浙江 金华 电信
初级用户
Credits 20
Posts 8
Joined 2007-04-25 06:13
19-year member
UID 86387
Gender Male
From 浙江
Status Offline
How to set it up,, ask for advice,, but opening MAXTHON is very slow oh... Hehe
Also, may I ask if you can write such code for me?
1. Connect ADSL
2. Open the browser
3. Close the browser
4. Disconnect,
Loop this operation.. Thanks

How to add a loop statement.. For example, my code is like this

@echo off
ping 126.com -n 1

rem Set the connection name, ADSL account, ADSL password
set MyConnection=Change to your connection name
set MyUsername=Change to your ADSL account
set MyPassword=Change to your ADSL password

echo Connecting ADSL: %MyConnection% ...
Rasdial %MyConnection% %MyUsername% %MyPassword%
echo Connected: %MyConnection%

echo Starting Maxthon...
start D:\Program\Maxthon\Maxthon.exe
echo Started Maxthon

Rasdial %MyConnection% /disconnect
echo Disconnected ADSL connection: %MyConnection%

[ Last edited by cares on 2007-4-27 at 01:01 PM ]
Floor 6 Posted 2007-04-28 01:57 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
```
@echo off
:begin
rasdial 网络连接 username password
start Maxthon.exe
ping 127.1 -n 5 >nul
taskkill /f /im Maxthon.exe
rasdial 网络连接 /disconnect
goto :begin


[ Last edited by lxmxn on 2007-4-27 at 01:03 PM ]
```
Floor 7 Posted 2007-04-28 02:03 ·  中国 浙江 金华 电信
初级用户
Credits 20
Posts 8
Joined 2007-04-25 06:13
19-year member
UID 86387
Gender Male
From 浙江
Status Offline
May I ask the moderator to explain the explanation of this code?
Floor 8 Posted 2007-04-28 02:06 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
1. Use rasdial to connect to the network; Note: The network connection is the connection name, username is the user name, and password is the password for connection;
2. Open Maxthon;
3. Wait for about 4 seconds;
4. Close Maxthon;
5. Disconnect the connection;
6. Loop 1-5.
Floor 9 Posted 2007-04-28 02:09 ·  中国 浙江 金华 电信
初级用户
Credits 20
Posts 8
Joined 2007-04-25 06:13
19-year member
UID 86387
Gender Male
From 浙江
Status Offline
Using rasdial to connect to the network??????
I don't understand very much... Excuse me... Can the ADSL at my own home be connected in this way too???
Floor 10 Posted 2007-04-28 02:12 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Why don't you just try it?
Floor 11 Posted 2007-04-28 02:14 ·  中国 浙江 金华 电信
初级用户
Credits 20
Posts 8
Joined 2007-04-25 06:13
19-year member
UID 86387
Gender Male
From 浙江
Status Offline
Oh, okay. Thank you, moderator... I will definitely ask you again next time if I have questions...
Floor 12 Posted 2007-04-30 00:06 ·  中国 湖北 襄阳 电信
初级用户
Credits 128
Posts 8
Joined 2003-04-03 00:00
23-year member
UID 1384
Gender Male
Status Offline
Hehe, it's probably vote stuffing. If only the captcha could be read. But unfortunately, no one can do that now.
Floor 13 Posted 2007-04-30 23:12 ·  中国 浙江 金华 电信
初级用户
Credits 20
Posts 8
Joined 2007-04-25 06:13
19-year member
UID 86387
Gender Male
From 浙江
Status Offline
Moderator...It can't run...The following is correct..Can't connect...
Floor 14 Posted 2007-05-01 00:19 ·  中国 湖南 长沙 中移铁通
初级用户
Credits 87
Posts 33
Joined 2006-06-20 12:22
20-year member
UID 57306
Gender Male
From cs
Status Offline
"rasdial 网络连接 username password"
Moderator lxmxn, you've been a great help to me~! I've been wanting to achieve automatic internet connection, and now it's finally done.
I love you to pieces, hoho
Floor 15 Posted 2007-05-01 06:55 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 321
Posts 135
Joined 2007-02-04 04:48
19-year member
UID 78578
Gender Male
Status Offline
It would be better if the password were not placed in plain text in the BAT.
Forum Jump: