Re: Converting Xcode paths to usable paths
Re: Converting Xcode paths to usable paths
- Subject: Re: Converting Xcode paths to usable paths
- From: Matt Neuburg <email@hidden>
- Date: Wed, 02 Dec 2009 11:19:24 -0800
- Thread-topic: Converting Xcode paths to usable paths
On Tue, 01 Dec 2009 15:50:45 -0600, Steve Mills <email@hidden> said:
>Maybe so, but LOTS of things can't deal with them in a path. Try this
incredibly simple example and you'll see what I mean (it's weird, but should
work on any standard OS X installation). It gets stuck on the first ".." and
ends up revealing /Applications/TextEdit.app/Contents/MacOS/ instead:
>
>tell application "Finder"
> reveal POSIX file
"/Applications/TextEdit.app/Contents/MacOS/../../../Preview.app"
>end tell
The problem is merely the involvement of the Finder. Do it like this:
set f to "/Applications/TextEdit.app/Contents/MacOS/../../../Preview.app"
set p to POSIX file f
tell application "Finder" to reveal p
Ta-daa! m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden