home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / share / os2 / varios / hyperacc / haos2d.z / MCI.CMD < prev    next >
Encoding:
Text File  |  1996-07-02  |  1.8 KB  |  61 lines

  1. /* This program mci.cmd, created by Hilgraeve and assigned to the */
  2. /* MCI Mail phonebook entry runs an automated logon script for connecting */
  3. /* to the MCI Mail service */
  4.  
  5. /*    $Revision: 1.1 $  */
  6. /*    $Date: */
  7.  
  8. /* A REXX script MUST begin with a commented line */
  9. /* Text within slashes and asterisks (like this line) are comments. */
  10.  
  11. /* Parse the command line for arguments passed to this program */
  12. PARSE ARG pipename
  13.  
  14. /* Register external functions with REXX */
  15. CALL RxFuncAdd 'haLoadFuncs', 'HAP_AUTO', 'RxhaLoadFuncs'
  16. CALL haLoadFuncs
  17.  
  18. /* Establish a link between this script program and HyperACCESS */
  19. scripthandle = 0
  20. scripthandle = haInitialize(1, pipename)
  21. DROP pipename
  22.  
  23. /* Process only if link with HyperACCESS was successful */
  24. IF scripthandle <> 0 THEN
  25.     DO
  26.  
  27.     /* Initialize useful variables */
  28.     cr = '0D'x
  29.     lf = '0A'x
  30.     returnvalue = 0
  31.  
  32.     IF ReturnValue >= 0 THEN
  33.         ReturnValue = haWaitForPrompt(ScriptHandle, 1, " name: ", 300, 32000)
  34.  
  35.     /* Get User Name value from Runtime values dialog box */
  36.     IF ReturnValue >= 0 THEN
  37.         ReturnValue = haGetRuntimeValue(ScriptHandle, 1, 1, 128, 'UName')
  38.  
  39.     /* Type the value */
  40.     IF ReturnValue >= 0 THEN
  41.         ReturnValue = haTypeText(ScriptHandle, 0, UName || cr)
  42.  
  43.     /* Wait for a prompt */
  44.     IF ReturnValue >= 0 THEN
  45.                 ReturnValue = haWaitForPrompt(ScriptHandle, 1, "sword:  ", 300, 32000)
  46.  
  47.     /* Get Password value from Runtime Values dialog box */
  48.     IF ReturnValue >= 0 THEN
  49.         ReturnValue = haGetRuntimeValue(ScriptHandle, 3, 1, 128, 'PWord')
  50.  
  51.     /* Type the value */
  52.     IF ReturnValue >= 0 THEN
  53.         ReturnValue = haTypeText(ScriptHandle, 0, PWord || cr)
  54.  
  55.     /* Terminate link between HyperACCESS and script program */
  56.     CALL haTerminate scripthandle
  57.     END
  58.  
  59. DROP scripthandle
  60. CALL haDropFuncs
  61.