home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / internet / yamtools20 / yamtools20english / yam2ib.rexx < prev    next >
OS/2 REXX Batch file  |  1997-08-08  |  5KB  |  97 lines

  1. /******************************************************************************/
  2. /*                                                                            */
  3. /*                                  YAM2IB                                    */
  4. /*                                                                            */
  5. /*                      Copyright ©1997 by Dick Whiting                       */
  6. /*                                                                            */
  7. /*----------------------------------------------------------------------------*/
  8. /* This is a quickie to display text/html using IBROWSE. You must edit these  */
  9. /* variables prior to using:                                                  */
  10. /*                                                                            */
  11. /******************************************************************************/
  12.  
  13. runib='run >nil: TEMP:IBROWSE/IBrowse' /* set this to where IB program is     */
  14. ibscreen='IBROWSE'                     /* CASE SENSITIVVE screen name of IB   */
  15. waitsecs=15                            /* wait secs before deleting temp file */       
  16.  
  17. /******************************************************************************/
  18. /*                                                                            */
  19. /* If you have the rexxtricks.library installed then the IBROWSE screen will  */
  20. /* pop to the front correctly.                                                */
  21. /* You can find this on Aminet/util/rexx/RexxTricks_386.lha                   */
  22. /*                                                                            */
  23. /* You also need to set up a mime type in the configuration like this:        */
  24. /*                                                                            */
  25. /* text/html                                                                  */
  26. /* sys:rexxc/rx yam:rexx/yam2ib.rexx %s                                       */
  27. /*                                                                            */
  28. /* NOTE: Remember to select 'NEW' and THEN enter the information. Also make   */
  29. /* sure that you click 'SAVE';)                                               */
  30. /*                                                                            */
  31. /*----------------------------------------------------------------------------*/
  32. /* Standard Disclaimer: I wrote it, it works for me, I don't guarantee        */
  33. /* that it will do anything productive for anyone else, etc. etc. ;-)         */
  34. /*                                                                            */
  35. /*                                                                            */
  36. /*HOWEVER, if you do find a use for it: I homeschool my kids and they would   */
  37. /*love a postcard from where EVER you live. Instant Geography Lesson;)        */
  38. /*                                                                            */
  39. /*POSTCARDS:    Dick Whiting                                                  */
  40. /*              28590 S. Beavercreek Rd.                                      */
  41. /*              Mulino, Oregon 97042                                          */
  42. /*              USA                                                           */
  43. /*                                                                            */
  44. /*                                                                            */
  45. /*                                                                            */
  46. /*----------------------------------------------------------------------------*/
  47. /*                                                                            */
  48. /*                     Dick Whiting <dwhiting@europa.com>                     */
  49. /*                              13 January 1997                               */
  50. /*                                                                            */
  51. /******************************************************************************/
  52.  
  53. parse arg args
  54. options results
  55.  
  56. tricks=0
  57.  
  58. if ~show('L','rexxsupport.library') then do
  59.    addlib('rexxsupport.library',0,-30)
  60. end
  61.  
  62.  
  63. if ~show('L','rexxtricks.library') then do
  64.    if exists('LIBS:rexxtricks.library') then do
  65.       tricks=addlib('rexxtricks.library',0,-30)
  66.    end
  67. end
  68. else tricks=1
  69.  
  70. html=args||'.html'
  71.  
  72. Address Command 'Copy ' args html
  73.  
  74. if ~show(p,"IBROWSE") then do
  75.   Address Command runib 'file:///'html
  76.   do 5 while ~show(p,"IBROWSE")
  77.      Address Command 'SYS:REXXC/WAITFORPORT IBROWSE'
  78.   end
  79.   if rc=5 then do 
  80.      say 'Could not find IBROWSE port'
  81.   end
  82.   else do
  83.      foo=delay(waitsecs*50)
  84.   end
  85. end
  86. else do
  87.   Address IBROWSE GOTOURL 'file:///'html
  88.   if tricks then do
  89.      foo=PUBSCREENTOFRONT(ibscreen)
  90.   end
  91. end
  92.  
  93. Address Command 'Delete ' html '>nil: '
  94.  
  95. exit
  96.  
  97.