home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / htmlks10.zip / AddApplet.erx next >
Text File  |  1997-09-09  |  3KB  |  84 lines

  1. /*returns a string*/
  2. parse arg kase FullFile FileText
  3. CALL RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  4. CALL SysLoadFuncs
  5. say Fullfile
  6. NamEA=''
  7. AliEa=''
  8. AltEA=''
  9. HspEA=''
  10. VspEA=''
  11. HiEa=''
  12. WidEa=''
  13. call SysGetEA FullFile, 'HTMLKEYS_HEIGHT', 'EAval'
  14. if length(EAval)>=4 then HiEa=right(EAval, length(EAval)-4)
  15. call SysGetEA FullFile, 'HTMLKEYS_WIDTH', 'EAval'
  16. if length(EAval)>=4 then WidEa=right(EAval, length(EAval)-4)
  17. call SysGetEA FullFile, 'HTMLKEYS_NAME', 'EAval'
  18. if length(EAval)>=4 then NamEa=right(EAval, length(EAval)-4)
  19. call SysGetEA FullFile, 'HTMLKEYS_ALIGN', 'EAval'
  20. if length(EAval)>=4 then AliEa=right(EAval, length(EAval)-4)
  21. call SysGetEA FullFile, 'HTMLKEYS_ALT', 'EAval'
  22. if length(EAval)>=4 then AltEa=right(EAval, length(EAval)-4)
  23. call SysGetEA FullFile, 'HTMLKEYS_HSPACE', 'EAval'
  24. if length(EAval)>=4 then HspEa=right(EAval, length(EAval)-4)
  25. call SysGetEA FullFile, 'HTMLKEYS_VSPACE', 'EAval'
  26. if length(EAval)>=4 then VspEa=right(EAval, length(EAval)-4)
  27.  
  28.  
  29. call SysGetEA FullFile, 'HTMLKEYS_PARAMETERS', 'paramEA'
  30.  
  31. Params.0=0
  32. if c2d(left(paramEA,1))=253 then do
  33. Params.0=1
  34. Params.1=right(paramEA,length(paramEA)-4)
  35.  
  36.  
  37.  
  38.  
  39. end  /*if Do */
  40. else do
  41.      if length(paramEA) <> 0 then do
  42.           paramEA=right(paramEA, length(paramEA)-4)
  43.           Params.0=c2d(left(paramEA, 1))
  44.           paramEA=right(paramEA, length(paramEA)-2)
  45.           y=1
  46.           do while y<= Params.0
  47.                paramEA=right(paramEA, length(paramEA)-2)
  48.                strlen=c2d(left(paramEA, 1))
  49.                paramEA=right(paramEA, length(paramEA)-2)
  50.                Params.y=left(paramEA, strlen)
  51.                paramEA=right(paramEA, length(paramEA)-strlen)
  52.                y=y+1
  53.           end /* y < Params.0 do */
  54.      end /*if Params length do*/
  55. end /*else do*/
  56.  
  57.  
  58. OTline='<APPLET CLASS="'FileText'" HEIGHT='hiEa' WIDTH='widEa
  59. if NamEa \= '' then OTline=OTline||' NAME="'||NamEa||'"'
  60. if AltEa \= '' then OTline=OTline||' ALT="'||AltEa||'"'
  61. if HspEa \= '' then OTline=OTline||' HSPACE='||HspEa||''
  62. if VspEa \= '' then OTline=OTline||' VSPACE='||VspEa||''
  63. if AliEa \= '' then OTline=OTline||' ALIGN='||AliEa||''
  64. OTline=OTline||'>'
  65.  
  66. call etkinserttext OTline
  67. /*say OTline*/
  68. x=1
  69.  
  70.  
  71.  
  72. do while x<=Params.0
  73.  
  74. Parse value Params.x with 'NAME='theName' VALUE='theValue
  75.  
  76. call etkinserttext '<PARAM NAME="'theName'" VALUE="'theValue'">'
  77. /*say '<PARAM NAME="'theName'" VALUE="'theValue'">'*/
  78. x=x+1
  79. end /* do */
  80.  
  81. call etkinserttext '</APPLET>'
  82. /*say '</APPLET>'*/
  83.  
  84.