Re: get path of selected file
Re: get path of selected file
- Subject: Re: get path of selected file
- From: Matt Binkowski <email@hidden>
- Date: Wed, 03 Apr 2002 16:02:56 -0500
i got this to work but it looks like there's no way to have X set something
to the clipboard without a scripting addition. :( thanks for the help
though. it works very well.
try
tell application "Finder" to set pathToFile to (item 1 of (get
selection)) as alias as string
display dialog pathToFile
end try
on 4/3/02 3:50 PM, Paul Berkowitz at email@hidden wrote:
>
On 4/3/02 12:27 PM, "Matt Binkowski" <email@hidden> wrote:
>
>
> i used to have a handly little script that could retrieve the path of any
>
> selected file or folder but I seem to have lost it in the transition to os
>
> X...and to make matters worse, i cannot seem to remember how to write it
>
> again. i want to run the script from the script menu (like osa menu in 9) on
>
> a file that is selected in the finder. can anyone please help? even just
>
> hints on the syntax?
>
>
>
try
>
tell application "Finder" to set pathToFile to (item 1 of (get
>
selection)) as alias as string
>
>
on error
>
beep
>
display dialog "There's nothing selected in the Finder." buttons {"OK"}
>
default button 1 with icon 2
>
return
>
end try
>
>
-- display dialog pathToFile
_______________________________________________
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.