home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / Mathscript_cr.lzx / MathScript / Rexx / FW_InsertFormula.ms < prev    next >
Encoding:
Text File  |  1996-07-04  |  925 b   |  78 lines

  1. /* $VER: FW_InsertFormula.ms 1.0 (05.06.96)
  2. **
  3. **
  4. */
  5.  
  6. options results
  7.  
  8. fw=getclip("MS_FW")
  9.  
  10. if ~show('p',fw) then
  11.   do
  12.     fw="FINALW.1"
  13.     if ~show('p',fw) then
  14.       exit
  15.   end
  16.  
  17. address MATHSCRIPT.1
  18.  
  19. do i=0 while exists("T:MSFormula"||i)
  20.   end
  21.  
  22. name="T:MSFormula"||i
  23.  
  24. export EPS name FORCE
  25.  
  26. getboundingbox bbox
  27.  
  28. hide
  29.  
  30. address value fw
  31.  
  32. status page "Insert"
  33. page=result
  34.  
  35. setmeasure micropoints
  36.  
  37. currentobject
  38. id=result
  39.  
  40. x=-1
  41. y=-1
  42.  
  43. if id~=0 then
  44.   do
  45.     getobjectcoords id
  46.     page=word(result,1)
  47.     x=word(result,2)
  48.     y=word(result,3)
  49.     deleteobject id
  50.   end
  51.  
  52. w=bbox.urx-bbox.llx
  53. w=trunc(w*10)
  54.  
  55. h=bbox.ury-bbox.lly
  56. h=trunc(h*10)
  57.  
  58. getimportprefs textflow linked display
  59.  
  60. parse var result t l d
  61.  
  62. importprefs display preview textflow none linked no
  63.  
  64. /*insertimage name position page x y w h*/
  65.  
  66. INSERTIMAGE "T:MSFormula"||i POSITION page x y w h
  67.  
  68.  
  69. screentofront
  70.  
  71. redraw
  72.  
  73. importprefs textflow t linked l display d
  74.  
  75. exit
  76.  
  77.  
  78.