home *** CD-ROM | disk | FTP | other *** search
- /* 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.1 $ */
- /* $Date: 1996/07/02 14:53:53 $ */
-
- /* 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', 'HAP_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
-