Re: Path to Document in Script Editor
Re: Path to Document in Script Editor
- Subject: Re: Path to Document in Script Editor
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 15 Mar 2008 15:20:56 -0700
- Thread-topic: Path to Document in Script Editor
On 3/15/08 3:07 PM, "Luther Fuller" <email@hidden> wrote:
>> set docPath to POSIX file (path of (document of window 1))
>>
>> But it will be in colon delimited format instead of slash delimited:
>
> Colon delimited is exactly what I need, so I tried your syntax to
> replace my work-around.
> All I got was Error = -1700, Script Editor got an error: Can't make
> <<class psxf>> "/Users/username/Desktop/..." into type reference.
It works here. (Using 'window 2', since window 1 is where I'm running this
test code.)
If you're getting that error, it makes me wonder whether you're running that
code inside some other application's tell block, since it apparently doesn't
know what «class psxf» is.
The code only works within a Script Editor block or no tell block at all
*when running in Script Editor itself* (so the tell block is implicit.)
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden