Re: cocoa interact with finder
Re: cocoa interact with finder
- Subject: Re: cocoa interact with finder
- From: Raphael <email@hidden>
- Date: Fri, 20 Jan 2006 17:06:10 +0100
Thank you mike,
I have not think that it is so easy :-)
Thank you
raphael
Am 20.01.2006 um 15:56 schrieb Mike Abdullah:
Well, what I think you're after is actually ridiculously easy to
do! Simply open up script editor and type in:
tell application "Finder"
return POSIX path of (selection as string)
end tell
And save that as a script file. Set it up as a resource in your
app and use NSAppleScript to run it. The result returned should be
an NSString of the full path to the selected file or folder. It
may need some tweaking to cope with multiple files though.
Mike.
On 20 Jan 2006, at 14:07, Raphael wrote:
Hi,
thanks for the answer.
But I have no idea about apple script.
I have hope their will be a way through cocoa or carbon.
OK i think I start learning apple script.
Thank you & regard
raphael
Am 20.01.2006 um 14:58 schrieb Mike Abdullah:
Yes, an applescript that gets the path of the selected file of
the frontmost window of the Finder is pretty easy to write.
Using NSAppleScript to run that script and get the result from it
is pretty easy as well.
Mike.
On 20 Jan 2006, at 11:26, Camillo Lugaresi wrote:
On 20/gen/06, at 08:42, Raphael wrote:
Hi,
is it possible to get from a cocoa application the selected
finder file or folder?
I mean, if the finder has only select a file (not open it) can
I see the file path string in a cocoa
application?
You can use AppleEvents or an AppleScript (which uses AEs under
the hood). The latter is probably easier.
Camillo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@googlemail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden