Establishing Dial-Up connection, avoiding line drops
// This script demonstrates how to initiate Dial-Up connection from JAL
// script. To use a different connection name replace CompuServe with
// the name of your Dial-Up connection. RnaDial and your connection name
// are case sensitive, so match the text exactly. Make sure to setup your
// Dial-Up connection the way it remembers password and does not prompt for it.
Dim process_id, number
Dim window_handle, number
// Connect to CompuServe
Run( "rundll rnaui.dll,RnaDial CompuServe", "", process_id )
// Wait 60 seconds to allow Dial-Up networking to initiate the connection
Wait( 60 )
// do something here
// To disconnect from CompuServe, simple close Dial-Up window
// To leave connection online, comment the following two lines
WindowFind( "Connect To%", window_handle )
WindowClose( window_handle )
// If you do not want to close the connection, but instead keep this
// connection online even with long periods of inactivity, you can use
// the ping command. Setup a new job that will run All Day every minute.
// Select "program" type for this job and specify ping command in the
// program name field. This will allow to avoid line drops.
// For example: ping www.ibm.com