home *** CD-ROM | disk | FTP | other *** search
- /* This program mci.cmd, created by Hilgraeve and assigned to the */
- /* MCI Mail phonebook entry runs an automated logon script for connecting */
- /* to the MCI Mail service */
-
- /* $Revision: 1.1 $ */
- /* $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', '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
-
- IF ReturnValue >= 0 THEN
- ReturnValue = haWaitForPrompt(ScriptHandle, 1, " name: ", 300, 32000)
-
- /* Get User Name value from Runtime values dialog box */
- IF ReturnValue >= 0 THEN
- ReturnValue = haGetRuntimeValue(ScriptHandle, 1, 1, 128, 'UName')
-
- /* Type the value */
- IF ReturnValue >= 0 THEN
- ReturnValue = haTypeText(ScriptHandle, 0, UName || cr)
-
- /* Wait for a prompt */
- IF ReturnValue >= 0 THEN
- ReturnValue = haWaitForPrompt(ScriptHandle, 1, "sword: ", 300, 32000)
-
- /* Get Password value from Runtime Values dialog box */
- IF ReturnValue >= 0 THEN
- ReturnValue = haGetRuntimeValue(ScriptHandle, 3, 1, 128, 'PWord')
-
- /* Type the value */
- IF ReturnValue >= 0 THEN
- ReturnValue = haTypeText(ScriptHandle, 0, PWord || cr)
-
- /* Terminate link between HyperACCESS and script program */
- CALL haTerminate scripthandle
- END
-
- DROP scripthandle
- CALL haDropFuncs
-