home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / lib / AppleScript.sig next >
Encoding:
Text File  |  1997-08-18  |  1.5 KB  |  45 lines  |  [TEXT/Moml]

  1. (* AppleScript.sig *)
  2. (* 1997 Jul 04  e  *)
  3.  
  4. type OSAID
  5. type OSAerr = int
  6.  
  7. exception AppleScriptErr of OSAerr * string
  8.  
  9. val as_compile    : string -> OSAID
  10. val as_dispose    :  OSAID -> unit
  11. val as_run_script :  OSAID -> string
  12. val as_run_text   : string -> string
  13.  
  14. (*
  15.    These Mac specific functions provide the capability to compile 
  16.    and run AppleScript programs.
  17.  
  18.    The exception AppleScriptErr is raised in the event of an error.
  19.  
  20.    [as_compile str] compiles AppleScript source code text, returning
  21.    an abstract token of type OSAID. This token may be used to run
  22.    the script. The token may be used repeatedly until it is returned
  23.    with as_dispose or until mosml exits.
  24.  
  25.    [as_dispose tok] disposes of the resources associated with the 
  26.    OSAID token so that they may be reused by the AppleScript system.
  27.    AppleScriptErr is raised upon any attemp to reuse a disposed token.
  28.  
  29.    [as_run_script tok] runs the script associated with the token.
  30.    This typically involves AppleEvent communication with other 
  31.    programs running on the Mac, or networked Macs. The AppleScript
  32.    result is returned as a string.
  33.  
  34.    [as_run_text str] compiles and runs the AppleScript source code text,
  35.    disposing all resources allocated in the process, and returns the
  36.    AppleScript result as a string.
  37. *)
  38.  
  39. (*
  40.    references:
  41.    Inside Macintosh: Interapplication Communication, Chapter 10
  42.    AppleScript Language Guide English Edition
  43.    -- available at http://applescript.apple.com/support.html
  44. *)
  45.