MATLAB Function Reference | Search  Help Desk |
applescript | Examples |
Load a compiled AppleScript from a file and execute it
applescript(filename
) applescript(filename
'-useEnglish
'
) 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.
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
.
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"');