MATLAB Function Reference
  Go to function:
    Search    Help Desk 
applescript    Examples

Load a compiled AppleScript from a file and execute it

Syntax

Description

applescript(filename) loads a compiled AppleScript from the file
filename and executes it. If filename is not a full path name, then
applescript searches for filename along the MATLAB path.

applescript(filename '-useEnglish') forces applescript to use the English AppleScript dialect when compiling both the script in filename and any AppleScript variables passed to the script. By default, applescript uses the current system AppleScript dialect, which can be set with (for example) the Script Editor application.

result = applescript(filename) returns in result the value that the AppleScript returns, converted to a string.

applescript(filename,'VarName1','VarValue1',...) sets the value of the AppleScript's property or variable whose name is specified in VarName to the value specified in VarValue.

Remarks

applescript is available on the Macintosh only.

Examples

Compile an AppleScript and save it to the file rename:

The applescript command renames file hello on volume MyDisk to the new name world.



[ Previous | Help Desk | Next ]