Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Path to Script in Script Editor's Front Window: FYI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Path to Script in Script Editor's Front Window: FYI



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




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.