Re: 256 char limit on alias path?
Re: 256 char limit on alias path?
- Subject: Re: 256 char limit on alias path?
- From: Ryan Hofschneider <email@hidden>
- Date: Mon, 01 Apr 2002 08:30:53 -0800
On Monday, April 1, 2002, at 02:21 AM, Andy Wylie wrote:
Any suggestions for a work around? And
maybe a related question: in my example above, is it possible to coerce
'dir' to a typeFileURL and return that instead?
here's a classic way...
------------------
set myStr to someAlias
set AppleScript's text item delimiters to {":"}
set x to (myStr's text items)
set AppleScript's text item delimiters to {"/"}
set x to x as string
set AppleScript's text item delimiters to ""
set typeFileURL to "file:///" & x
Thanks -- Your example is very close to a solution that I was originally
using. Unfortunately, I think this will break when there are multiple
drives mounted with the same name (a rare occurrence , but one I've
encountered a few times in the past.)
Also, I think there is currently a bug in AppleScript 1.8.1 on 10.1.2
that prevents you from getting text items of an alias that has Unicode
characters in its "path", the fix to your example to get around this
would be:
set myStr to (someAlias as string)
However, I've just realized that my original problem doesn't just occur
when I am coercing to an alias, but also to a string:
e.g.
tell application "Finder"
set dir to (folder of the front window)
return dir as string
end tell
will give me a similar error ("can't make class cfol .... into string")
if the "path" of dir is longer than 256 characters.
Ryan
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.