| MATLAB Functions | Help Desk |
applescript
Load a compiled AppleScript from a file and execute it
applescript(filename) result = applescript(filename) applescript(filename,'VarName1','VarValue1', ...)
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.
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.
applescript is available on the Macintosh only.
Compile an AppleScript and save it to the file rename:
tell application "Finder" set name of item itemName to newName end tellThe
applescript command renames file hello on volume MyDisk to the new name world.
applescript('rename', 'itemName', '"MyDisk:hello"', ...
'newName', '"world"');