Re: File URL to Alias?
Re: File URL to Alias?
- Subject: Re: File URL to Alias?
- From: Shane Stanley <email@hidden>
- Date: Tue, 25 Feb 2014 10:12:52 +1100
On 25 Feb 2014, at 8:45 am, koenig.yvan <email@hidden> wrote:
Of Course Shane will give it in the library format.
Why not?
use framework "Foundation" on pathFromTextURL:theURL set thePath to current application's NSString's stringWithString:theURL -- make an NSString set thePath to thePath's stringByReplacingPercentEscapesUsingEncoding:(current application's NSUTF8StringEncoding) -- replace encoded chars set theStart to location of (thePath's rangeOfString:"/") -- find / to reomve file: bit return (thePath's substringFromIndex:theStart) as text end pathFromTextURL:
|
_______________________________________________
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