Path to Script in Script Editor's Front Window: FYI
Path to Script in Script Editor's Front Window: FYI
- Subject: Path to Script in Script Editor's Front Window: FYI
- From: "Jonathan Levi, M.D." <email@hidden>
- Date: Tue, 29 Mar 2005 00:57:04 -0500
Hi all,
In the course of writing a script to get the path to the file of the
Script Editor's front window, I discovered:
a. The following script works:
tell application "Script Editor"
set pathU to (path of document of front window)
end tell
POSIX file pathU
--result: file "HD:Users:jonathan:Desktop:MacPathToScript.scpt"
b. The following permutation doesn't (surprisingly, I think):
tell application "Script Editor"
set pathU to (path of document of front window)
POSIX file pathU
end tell
--NSCannotCreateScriptCommandError
Script writers facing the same task as I may find the above useful.
--Jonathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden