home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
haotd1_1.zip
/
GENIE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-10-12
|
2KB
|
54 lines
/* This program genie.cmd created by Hilgraeve and assigned to the Genie */
/* phonebook entry runs an automated logon script for connecting to Genie. */
/* $Revision: 1.4 $ */
/* $Date: 1995/09/13 10:46:19 $ */
/* 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
lf = '0A'x
returnvalue = 0
/* Type three 'h's then <enter> */
IF returnvalue >= 0 THEN
returnvalue = haTypeText(scripthandle, 0, 'hhh'cr)
/* Wait for id/password prompt */
IF returnvalue >= 0 THEN
returnvalue = haWaitForPrompt(scripthandle, 1, 'U#=', 300, 16000)
/* Get/prompt for User ID value from Runtime Values dialog box */
IF returnvalue >= 0 THEN
returnvalue = haGetRuntimeValue(scripthandle, 2, 1, 128, 'idval')
/* Get/prompt for Password value from Runtime Values dialog box */
IF returnvalue >= 0 THEN
returnvalue = haGetRuntimeValue(scripthandle, 3, 1, 128, 'passval')
/* Type the logline */
IF returnvalue >= 0 THEN
ReturnValue = haTypeText(scripthandle, 0, idval','passval||cr)
/* Terminate link between HyperACCESS and script program */
CALL haTerminate scripthandle
END
DROP scripthandle
CALL haDropFuncs