home *** CD-ROM | disk | FTP | other *** search
Wrap
/* This program sio.cmd created by Hilgraeve and assigned to the SIO support*/ /* phonebook entry runs an automated logon script for connecting to the SIO support service */ /* $Revision: 1.1 $ */ /* $Date: 1996/07/02 14:53:46 $ */ /* 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 nul = '00'x returnvalue = 0 /* Wait for initail prompt */ IF returnvalue >= 0 THEN returnvalue = haWaitForPrompt(scripthandle, 1, 'er)=no? ', 300, 15000) /* Type Y for yes, ANSI graphics */ IF returnvalue >= 0 THEN returnvalue = haTypeText(scripthandle, 0, 'y'cr) /* Wait for name prompt */ IF returnvalue >= 0 THEN returnvalue = haWaitForPrompt(scripthandle, 1, 'me? '||'1B'x'[0m', 300, 14000) /* Get/prompt for User ID value from Runtime Values dialog box--full name first and last */ IF returnvalue >= 0 THEN returnvalue = haGetRuntimeValue(scripthandle, 1, 1, 128, 'nameval') /* Type the User Name */ IF returnvalue >= 0 THEN returnvalue = haTypeText(scripthandle, 0, nameval||cr) /* Wait for password prompt or new caller prompt */ IF returnvalue >= 0 THEN returnvalue = haWaitForPrompt(scripthandle, 2, '[13D'||'1B'x'[0m'nul'[0mC'||'1B'x'[1D'nul , 300, 13000) /* If std login - do this block */ IF returnvalue == 0 THEN DO /* Get/prompt for Password value from Runtime Values dialog box */ IF returnvalue >= 0 THEN returnvalue = haGetRuntimeValue(scripthandle, 3, 1, 128, 'passval') /* Type the password value */ IF returnvalue >= 0 THEN returnvalue = haTypeText(scripthandle, 0, passval||cr) /* Wait for message prompt */ IF returnvalue >= 0 THEN returnvalue = haWaitForPrompt(scripthandle, 1, 'es? '||'1B'x'[0m', 300, 19000) /* Type ENTER for message search */ IF returnvalue >= 0 THEN returnvalue = haTypeText(scripthandle, 0, cr) END /* If first time caller to SIO BBS do this block */ ELSE DO /* DIsplay message box telling user to continue reg but abort script */ IF returnvalue >= 0 THEN returnvalue = haMessageBox(scripthandle, 'HyperACCESS Message', 'Your name was not found in the User file of this BBS. Please continue BBS logon manually as a new user', 0, nul, 1) END /* Terminate link between HyperACCESS and script program */ CALL haTerminate scripthandle END DROP scripthandle CALL haDropFuncs