MacComCenter Plus has several advanced features which can make your on-line communications sessions quicker and easier to manage by automating various functions.
MacComCenter Plus can quickly connect you to your accounts on some of the major on-line services. Before it can do this, however, you must set up MacComCenter Plus with the proper account information. When configured, you can connect to on-line services such as Dow Jones, CompuServe, and GEnie with a single click of the mouse.
Follow the appropriate section(s) for your on-line service account(s):
| CompuServe | If you will be calling CompuServe, use this section to enter your Account number and Password, and select the public network (Compunet, Telenet, or Tymnet) you want to access by entering the phone number and selecting the corresponding radio button. |
| Dow Jones | If you will be calling Dow Jones, use this section to enter your Password and select the public network (Telenet or Tymnet) you want to access by entering the phone number. |
| GEnie | If you will be calling GEnie, use this section to enter your User ID and Password. Do not enter the separating comma. Enter the telephone number needed to connect to GEnie in the GEnienet field. |
Once the account information is entered, simply pull down the Data menu and select Run Script. Selecting the appropriate on-line service will automatically dial your modem, log you in, and enter your password. You can also select the desired on-line service from the Macros menu.
The ten text boxes on the Macros Setup dialog, allow you to enter the literal string you want transmitted when the selected command key combination is depressed, or to specify a script file name if you want a script file launched when the assigned keys are pressed. To assign a script file, select the Script check box and select the script file from the resulting file selection box. The text box may contain either a literal string or a script file name, but not both.
The commands that comprise the script language may be entered in either upper or lower case. Each line of
the script may contain only one command. The commands may be indented to any point you wish to
enhance readability. Blank lines may also be inserted in the script files to show breaks in sections of the
script statements.
You may include comments in the script file by starting the comment with "/*" and ending the comment
with "*/". For example:
/* This is a sample comment */
When sending strings to a remote computer, a string may be defined to include a literal value, a carriage
return character or an ASCII character represented by its decimal value. Literal character strings must be
enclosed by double quotes. A return character is defined by including a '\r' in the command line. An
ASCII character is defined by including a '\xHH' in the command line, where HH is the hexadecimal value
of the ASCII character. For example, to send a Control-C to a remote computer the literal string would be:
Out("\x03");
The script must begin with the "main( )" function. This is the function that is first called during
execution. It must be followed by a open curly brace "{" and the function must end in a closed curly brace
"}". The actual script commands go in the lines between the curly braces and are followed by semicolons
";". A simple script file would look something like this:
/* Sample Script 1 */
main( )
{
Script Command Line 1;
Script Command Line 2;
}
When writing a script, thought should be given to the steps you would like the script to perform. In the
case of logging into the American E-Mail BBS, a script must do the following:
main( )
{
You can put comments before this if you wish. Reviewing the list of commands, it can be seen that only
three commands are needed in this script: Dial, In, and Out. The script must dial the American E-Mail
BBS first, so the next line would be:
Dial("17143625822");
The actual script instructions may be typed with one tab stop before it in order to indent each line for easy
reading later on.
Next, the script must wait for the User ID prompt, which is:
Otherwise type 'new':
It would also be nice if, after a certain amount of time with nothing happening while waiting for the
prompt, the script would pass control back to the user. The In command can do all this, so the fourth line
should be:
In("'new':",30);
This will wait for the prompt for 30 seconds before returning control to the keyboard.
After sensing the prompt, the script must type out the User ID, which calls for the Out command. The next
script line should be:
Out("Your ID\r");
Your ID should be replaced with whatever the User ID of the account actually is. The \r tells the script to
send out a carriage return, as if the Return key is pressed.
The prompt for the account password is:
Enter your password:
so the next line should be:
In("password:",30);
To type the password, the final script line should be:
Out("Your PW\r");
where Your PW is your actual account password.
To pass control back to the keyboard once the automation is finished, the last line should be a closing
curly brace.
The script file should now look like this:
/*American E-Mail Script */
main()
{
Dial("17143625822");
In("'new':",30);
Out("Your ID\r");
In("password:",30);
Out("Your PW\r");
}
Save this file as an executable script with the file name "American E-Mail" in the MacComCenter 2.0
folder.