home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
haotd1_1.zip
/
ATTMAIL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-10-12
|
2KB
|
64 lines
/* This program attmail.cmd, created by Hilgraeve and assigned to the */
/* AT&T Mail phonebook entry runs an automated logon script for connecting */
/* to the AT&T Mail service */
/* $Revision: 1.6 $ */
/* $Date: */
/* A REXX script MUST begin with a commented line */
/* Text within slashes and asterisks (like this line) are comments. */
/* Parse the command line for arguments passed to this program */
PARSE ARG pipename
/* Register external functions with REXX */
CALL RxFuncAdd 'haLoadFuncs', 'HA_AUTO', 'RxhaLoadFuncs'
CALL haLoadFuncs
/* Establish a link between this script program and HyperACCESS */
scripthandle = 0
scripthandle = haInitialize(1, pipename)
DROP pipename
/* Process only if link with HyperACCESS was successful */
IF scripthandle <> 0 THEN
DO
/* Initialize useful variables */
cr = '0D'x /* This is the hex value for carriage return */
lf = '0A'x /* This is the hex value for line feed */
nul = '00'x
returnvalue = 0
/* If the returnvalue is ok, we'll wait for the first prompt */
IF returnvalue >= 0 THEN
returnvalue = haWaitForPrompt(scripthandle, 1, ' Name: ', 300, 100000)
/* Query the user name value from the Runtime Values dialog box */
IF returnvalue >= 0 THEN
returnvalue = haGetRuntimeValue(scripthandle, 1, 1, 128, 'Buffer')
/* Type the value stored in the user name runtime value */
IF returnvalue >= 0 THEN
returnvalue = haTypeText(scripthandle, 0, Buffer || cr)
/* Wait for the password prompt */
IF returnvalue >= 0 THEN
returnvalue = haWaitForPrompt(scripthandle, 1, 'ssword:', 300, 32000)
/* Query the password value from the Runtime Values dialog */
IF returnvalue >= 0 THEN
returnvalue = haGetRuntimeValue(scripthandle, 3, 1, 128, 'BufferPas')
/* Type the value stored in the password runtime value */
IF returnvalue >= 0 THEN
returnvalue = haTypeText(scripthandle, 0, BufferPas || cr)
/* Terminate link between HyperACCESS and script program */
CALL haTerminate (scripthandle)
END
/* Drop the scripthandle variable from memory */
DROP scripthandle
CALL haDropFuncs