Stay Connected! - A script to avoid line drops

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Stay Connected! - A script to avoid line drops

Post by Marcus Tettmar » Sat Sep 12, 1998 11:00 pm

Contributed By: Marcus Tettmar [email protected]
Submitted On: 13/09/98

Here's how you can make Macro Scheduler keep you online if you have a temperamental connection to your ISP, or need to keep connected even with long periods of inactivity.

Basically it works by using the Windows Ping program to ping a server intermittently.

Let>RP_WINDOWMODE=0
Label>Start
Run Program>ping.exe http://www.mjtnet.com
Wait>60
Goto>Start

The first line makes sure the ping program runs hidden.

The only problem with this is that you have to remember to run the script each time you go on line, and you'll have to stop it when you come off line, otherwise it will force a connection to the 'net in the next iteration.

If you use Macro Scheduler to automate DUN (http://www.mjtnet.com/usergroup/viewtopic.php?t=1582) to dial up and disconnect, then that problem is solved and you can just incorporate the above script into that routine.

On Windows 95/98 another solution is to watch out for the 'Connected To' window that is present (albeit hidden) while you are on line :

Let>RP_WINDOWMODE=0
Label>Start
IfWindowOpen>Connected To*,DoPing
Goto>Start
Label>DoPing
Run Program>ping.exe http://www.mjtnet.com
Wait>60
Goto>Start

Then you can just have the script run all the time and it will ping only when you connect.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts