home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / WordProcessors / DC-PS332.DMS / in.adf / Help.lha / help.rexx next >
Encoding:
OS/2 REXX Batch file  |  1997-09-20  |  929 b   |  51 lines

  1. /* 
  2.    Copyright 1997 SoftLogik Publishing Corporation
  3.    May not be distributed without SoftLogik Publishing Corporation's express written permission 
  4.    $VER: Help.rexx 1.0 (11.9.97)
  5. */
  6.  
  7. OPTIONS RESULTS
  8. TRACE OFF
  9.  
  10. /* Make sure rexx support is opened */
  11. IF ~SHOW('L','rexxsupport.library') THEN
  12.    CALL ADDLIB('rexxsupport.library',0,-30)
  13.  
  14. helppath = arg(1)
  15. href = arg(2)
  16. anchor = arg(3)
  17.  
  18.  
  19. if ~show(P, 'HHV') then do
  20.     /* Run help viewer */
  21.     ADDRESS COMMAND
  22.     'run >nil: pagestream3:hhv SETPATH='helppath
  23.  
  24.     /* Wait until the ARexx port shows up */
  25.     do 20
  26.         if ~show(P, 'HHV') then call delay(50)
  27.     end
  28.  
  29.     /* If the ARexx port didn't show up, alert the user and exit */
  30.     if ~show(P, 'HHV') then do
  31.         EXIT
  32.     end
  33. ADDRESS 'HHV'
  34. end
  35. else do
  36. ADDRESS 'HHV'
  37. 'setpath 'helppath
  38. end
  39.  
  40. 'screentofront'
  41. if anchor~='' then href=href'#'anchor
  42. 'currenturl'
  43. if (RC = 0) then do
  44. say 'goto 'href
  45. 'goto 'href
  46. end
  47. else do
  48. say 'open 'href
  49. 'open 'href
  50. end
  51.