/*REXX*/ /*------------------------------------------------------------------- This Help Macro is used to display a help screen for a keyword based on the extension of the filename such as SPF, REX, CMD, PHP, etc. Works with web pages (on or off-line) and with Windows Compiled HTML Manuals (CHM). Using SPFPRO/SPFPC4: Assign a key to the H3.SPF macro, place cursor over keyword in document and press key. SPF/PC, SPFSE, XE or non-REXX integrated editor, use the editor's DOS command to call the REXX interpreter passing it the macro path/name, language and keyword. Example: SPF/PC: TSO c:\path\REXX.EXE C:\PATH\H3.SPF PHP REQUIRE SPFSE: DOS c:\path\REXX.EXE C:\PATH\H3.SPF PHP REQUIRE XE: cmd c:\path\REXX.EXE C:\PATH\H3.SPF PHP REQUIRE NOTE1: For SPF/PC, XE or other non-REXX integrated editor it makes calling this macro easier if you set up a batch script to call the REXX interpreter. EXAMPLE: @ECHO OFF REM --------------------------------------------------------- REM H.BAT Calls my Help System REM Presumes that H.BAT resides somewhere in the command path REM --------------------------------------------------------- H:\U\PCDOS\REXX.EXE H:\U\SPFPC40\MACROS\H3.SPF %1 %2 so SPF/PC would be: TSO H PHP REQUIRE SPFSE would be: DOS H php require (yes, spfse via a batch file can execute rexx macros) XE would be: CMD h PHP REQUIRE For HTML or CHM type helps Internet Explorer is Invoked. Press ALT F4 to close that window when done. Change the THELP variable to point to your .BDX files. NOTE2: The normal path for IE contains spaces which will not work for SPFPC 4.x (DOS) or any DOS based REXX interpreter. Hence the reason you need a DOS friendly path to IEXPLORE. Copy IEXPLORE.EXE to directory without spaces. Be sure to change the TBROWSER path in this macro to match the new path. NOTE3: You can call info from the Help file or from any help file by entering the resquest on the command line. EXAMPLE: H3 PBW strings regardless of what type of code is being edited in from the PBW strings will be displayed. H3 strings Will display the strings info of the current code type (Extension BAS REX) NOTE4: For SPFPRO users, when editing .spf/isp files the SFPRO help system is called. NOTE5: To call this macro with a double left moust click: SPFPRO: Edit the keyboard mouse value by selecting =0.k then edit (e) the keyboard profile (such as DEFAULT) then selection option 6 (Mouse) then change LEFT-Doubleclick from [Cursor-mouse-select] to h3.spf SPFPCv4: Same changing Button-1-Double from [CURSOR-MOUSE-SELECT] to h3.spf NOTE6: If using OOREXX you need to delete the SPFPCv/SPFPRO ISREDIT code or it will refuse to execute. This is due to OOREXX scanning the code for errors before it executes the code. A debatable benefit. By Mark McDonald - Last Update 18 Mar 2008 -------------------------------------------------------------------*/ /* TRACE I */ /*--- Determine IF SPFPRO, SPFPC v4.x or Stand-alone REXX Interpreter ---*/ parse version name level date1 date2 date3 /*--- Use this section to display REXX Interpreter Info ---*/ /* SAY ' name = "'name'"' SAY 'level = "'level'"' SAY 'date1 = "'date1'"' SAY 'date2 = "'date2'"' SAY 'date3 = "'date3'"' EXIT */ /*-- Determine which REXX interpreter is being used ---*/ TSPF = 0 /* Using a stand-alone DOSREXX Interpreter */ IF (name = "REXX-r4" & date3 = 2007) THEN TSPF = 1 IF (name = "REXX/2" & date3 = 1995) THEN TSPF = 4 /* Using SPFPC v4 */ IF (name = "REXX/2" & date3 = 1996) THEN TSPF = 5 /* Using SPFPRO */ /*--- Determine Path of Browser for Interpreter ---*/ TBROWSER = "H:\U\IE.EXE" /* USE FOR SPC/PC 4.x or Stand Alone REXX Interpreter*/ /*--- Path of Help File Indexs (BDX) ---*/ THELP = "H:\U\MHELP\" TFILEOUT = "C:\TEMP\DRET.HTM" TBATCHIN = "C:\TEMP\DRET.DAT" /*--- Use for stand-alone REXX */ IF (TSPF <> 4 & TSPF <> 5) THEN DO PARSE UPPER ARG EXNT PARMS /*--- Remember DOS can not handle a parm with a < or > in it --*/ IF EXNT = "HTML" | EXNT = "HTM" THEN PARMS = '<'PARMS IF EXNT = "SPFSE" THEN DO column = WORD(PARMS,1) FULLNAME = WORD(PARMS,2) EXNT = SUBSTR(FULLNAME,POS('.',FULLNAME)+1,3) text = TRANSLATE(WORD(PARMS,3),' %<>|@"=',"Çüéâäàåç") PARMS = TUNMASK(text, column) END END /*--- This section used for SPFPRO/SPFPCv3/4 Only ---*/ IF (TSPF = 4 | TSPF = 5) THEN DO /*--- Since OOREXX/Reginald checks ALL syntax prior to execution if using OOREXX/Reginald ---*/ 'ISREDIT MACRO(PARMS)' IF WORDS(PARMS) = 1 & TRANSLATE(PARMS) = "H" THEN DO ERRLINE = "H3.SPF PARMS: H3 EXT KEYWORD H3 KEYWORD H3 PHP SUBSTR H3 HTM