home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxtt33.zip / RXTTWWW.CMD < prev   
OS/2 REXX Batch file  |  2000-12-24  |  3KB  |  88 lines

  1. /* Dispatcher for calling internet programs from within REXX Tips & Tricks   */
  2. /*                                                                           */
  3. /* Usage:                                                                    */
  4. /*                                                                           */
  5. /*    www http www_address                                                   */
  6. /*    www news newsgroup                                                     */
  7. /*    www ftp ftp_address                                                    */
  8. /*    www mail mailAddress                                                   */
  9. /*    www cis  CISAdress                                                     */
  10. /*    www fido FidoAdress                                                    */
  11. /*                                                                           */
  12. /* Note:                                                                     */
  13. /*                                                                           */
  14. /*                                                                           */
  15. /*    This sample file uses the program NETSCDDE.EXE from the XWorkplace     */
  16. /*    package.                                                               */
  17. /*                                                                           */
  18.  
  19.   parse arg action iAdress
  20.  
  21.   progDesc = 'www - Dispatcher for REXX Tips & Tricks'
  22.  
  23.   select
  24.  
  25.     when action = 'http' then
  26.     do
  27.                     /* call Netscape using NETSCDDE.EXE from the            */
  28.                     /* XWorkplace package                                   */
  29.       '@netscdde.exe -Xn http://' || iAdress
  30.     end /* when */
  31.  
  32.     when action = 'ftp' then
  33.     do
  34.                     /* call Netscape using NETSCDDE.EXE from the            */
  35.                     /* XWorkplace package                                   */
  36.       '@netscdde.exe -Xn ftp://' || iAdress
  37.     end /* when */
  38.  
  39.     when action = 'news' then
  40.     do
  41.                     /* call Netscape using NETSCDDE.EXE from the            */
  42.                     /* XWorkplace package                                   */
  43.       '@netscdde.exe -Xn news://' || iAdress
  44.     end /* when */
  45.  
  46.     when action = 'mail' then
  47.     do
  48.                     /* call Netscape using NETSCDDE.EXE from the            */
  49.                     /* XWorkplace package                                   */
  50.       '@netscdde.exe -Xn mailto:' || iAdress
  51.     end /* when */
  52.  
  53.     when action = 'cis' then
  54.     do
  55.                     /* convert the CIS address to an internet address       */
  56.        parse var iAdress part1 ',' part2
  57.        iAdress = strip( part1 ) || '.' || strip( part2 ) || '@compuserve.com'
  58.  
  59.                     /* call Netscape using NETSCDDE.EXE from the            */
  60.                     /* XWorkplace package                                   */
  61.       '@netscdde.exe -Xn mailto:' || iAdress
  62.     end /* when */
  63.  
  64.     when action = 'fido' then
  65.     do
  66.       say progDesc
  67.       say
  68.       say 'Error: I do not know how to handle FIDO addresses!'
  69.       say
  70.       say 'Press ENTER to exit'
  71.       parse pull     
  72.     end /* when */
  73.  
  74.     otherwise
  75.     do
  76.       say progDesc
  77.       say
  78.       say 'Error: Invalid arguments: "' || action iAdress || '"'
  79.       say
  80.       say 'Press ENTER to exit'
  81.       parse pull
  82.     end /* otherwise */
  83.  
  84.   end /* select */
  85.  
  86. '@exit'
  87.  
  88.