home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / haotd1_1.zip / CIS.CMD < prev    next >
OS/2 REXX Batch file  |  1995-10-12  |  2KB  |  52 lines

  1. /* This program cis.cmd created by Hilgraeve and assigned to the Compuserve phonebook*/
  2. /* entry. It is an automated logon script for connecting to Compuserve.              */
  3.  
  4. /*    $Revision: 1.5 $  */
  5. /*    $Date: */
  6.  
  7. /* Text within slashes and asterisks (like this line) are comments. */
  8. /* Parse the command line for arguments passed to this program */
  9. PARSE ARG pipename
  10.  
  11. /* Register external functions with REXX */
  12. CALL RxFuncAdd 'haLoadFuncs', 'HA_AUTO', 'RxhaLoadFuncs'
  13. CALL haLoadFuncs
  14.  
  15. /* Establish a link between this script program and HyperACCESS */
  16. scripthandle = 0
  17. scripthandle = haInitialize(1, pipename)
  18.  
  19. DROP pipename
  20.  
  21. /* Process only if link with HyperACCESS was successful */
  22. IF scripthandle <> 0 THEN
  23.         DO
  24.  
  25.         /* Initialize useful variables */
  26.         cr = '0D'x
  27.         lf = '0A'x
  28.         returnvalue = 0
  29.  
  30.         IF returnvalue >= 0 THEN
  31.                 returnvalue = haTypeText(scripthandle, 0, '03'x)
  32.         IF returnvalue >= 0 THEN
  33.                 returnvalue = haWaitForPrompt(scripthandle, 1, 'ser ID: ', 300, 14000)
  34.         IF returnvalue >= 0 THEN
  35.                 returnvalue = haGetRuntimeValue(scripthandle, 2, 1, 40, 'UserID')
  36.         IF returnvalue >= 0 THEN
  37.                 returnvalue = haGetRuntimeValue(scripthandle, 3, 1, 40, 'Password')
  38.         IF returnvalue >= 0 THEN
  39.                 returnvalue = haTypeText(scripthandle, 0, UserID || cr)
  40.         IF returnvalue >= 0 THEN
  41.                 returnvalue = haWaitForPrompt(scripthandle, 1, 'ssword: ', 300, 15000)
  42.         IF returnvalue >= 0 THEN
  43.                 returnvalue = haTypeText(scripthandle, 0, Password || cr)
  44.         IF returnvalue >= 0 THEN
  45.                 returnvalue = haTypeText(scripthandle, 0, "TOP" || cr)
  46.  
  47.         /* Terminate link between HyperACCESS and script program */
  48.         CALL haTerminate scripthandle
  49.         END
  50. DROP scripthandle
  51. CALL haDropFuncs
  52.