(Contents)(Previous)(Next)

Dial-Up Connection Automation Scripts (*.SCP)

Windows 95 provides several standard Dial-Up Connection scripts. For example, to connect to CompuServe, the script CIS.SCP has been provided. To connect to other Internet service providers, you might have to modify one of the provided PPP or SLIP scripts.

The Script language is documented in the Dial-Up Scripting Tool's Help file and in the Microsoft Word file Script.doc.. For Windows 95 this file is stored in the directory \Program Files\Accessories\. For Windows NT 4.0 this file is stored in the directory \Winnt\System32\Ras\.

Two examples of script files are given next. The first one connects with the PPP protocol by dialing the host computer.

Code Listing 1. PPP Dial-Up Connection Script with no Call Back

proc main
waitfor "Annex username:" until 5
transmit "your_user_name^M"
waitfor "Annex password:" until 5
transmit "your_user_password^M"
waitfor "your_system_prompt" until 15
transmit "ppp^M"
endproc

A more secure alternative consists of the client contacting the server and requesting a connection. The server then calls back the client at a pre-arranged telephone number.

Code Listing 2. PPP Dial-Up Connection Script with Call Back

proc main
waitfor "Annex username:" until 5
transmit "your_user_name^M"
waitfor "Annex password:" until 5
transmit "your_user_password^M"
waitfor "Access Code: " until 25
transmit "your_user_accesscode^M"
waitfor "RING"
transmit "ATA^M"
waitfor "Annex username:" until 25
transmit "your_user_name^M"
waitfor "Annex password:" until 25
transmit "your_user_password^M"
waitfor "your_system_prompt" until 25
transmit "ppp^M"
endproc

In order for this script to work, the modem will have to ignore the DTR signal so that the script does not terminate when the server breaks the connection. This can be achieved by setting a modem connection setting to &C0.

1. Double-click the Modem applet in the Control Panel

2. Click on the modem that will be used and click on the Properties button

3. Select the Connection tab

4. Press the Advanced Button

5. Type &C0 in the settings field, where the last token is the numeral zero not the letter O

6. Press on all the OK buttons until you are back at the Control Panel

Figure 8. Advanced Modem Connection Settings

Note that the same dialog box can also be used to specify that a log file records all connection commands and connections.


(Next)