There is a nice (Carbon only) example on how to edit and run an AppleScript 
from Xojo.

When building for Cocoa it won’t do the formating, as .SetTextAndStyle is not 
available.

How could I get a formatted ouput of an AppleScript, similar to the MBS 
Example? 
Method format from “AppleScript Editor” :

===
Sub format()
  dim a as AppleScriptMBS
  dim s,t as string
  
  a=new AppleScriptMBS
  
  a.Compile EditField1.text
  
  if a.Lasterror=0 then
    t=a.Source
    s=a.SourceTextStyle
    if s<>"" and t<>"" then
      EditField1.SetTextAndStyle t,s
    else
      MsgBox "Decompile error."
    end if
  else
    MsgBox "Compile error."
  end if
End Sub
===

Oliver
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to