Scripting Additions Guide
Table Of Contents
CHAPTER 2
Scripting Addition Commands
Command Definitions 31
This example returns just the file type for Scriptable Text Editor.
set x to info for ¬
file "Turing’s World:Scriptable Text Editor"
x's file type
--result: "APPL"
This example displays a dialog box if the Scriptable Text Editor isn’t locked.
if locked of ¬
(info for file "Hard Disk:Scriptable Text Editor") ¬
is false then
display dialog "Scriptable Text Editor is not locked."
end if
NOTES
To specify the name (nameString) of a file, use a string of the form "Disk:Folder1:
Folder2:...:Filename" as described in Chapter 5, “Objects and References,”
of the AppleScript Language Guide. If you specify only the name of the file
(Filename) instead of its entire pathname, AppleScript attempts to find the file in
the current directory.
ERRORS
Error
number Error message
–35 Disk <name> wasn't found.
–37 Bad name for file.
–43 File <name> wasn't found.
–50 Parameter error.
–108 Out of memory.
–120 Folder <name> wasn't found.
–1700 Can't make some data into the expected type.
–1701 Some parameter is missing for <commandName>.
–1704 Some parameter was invalid.
–1705 Operation involving a list item failed.
–1718 Reply has not yet arrived.