Thanks Mark,
Works perfectly -- even when I have a file or folder selected in Find File!
A couple of problems though.
I installed the script in
Macintosh HD:Users:myUserName:Library:Scripts -- (see it works!)
.... so it's available in the Finder menu bar.
But when I run the script sometimes it opens folder containing the script,
bringing it the front of the Finder.
??? What causes that side effect?
Another problem: Aliases don't work with AppleScript's Library: Scripts
folder?
I want to keep a folder of my scripts in my documents area, rather than
storing them in the system folders! But I'm not having good luck with
aliases and the Scripts folder.
I copied an alias of the script to the Scripts folder It appears in the menu
-- and when I run it, it flashes the finder item -- but the clipboard is
empty. When put the original back in Scrips it works fine!
Similarly I placed an alias of my scrips folder into the Library: Scripts
folder. But the foldfer doesn't show in the menu.
If I move my original scripts folder into Library: Scripts everything
appears in the menu.
System 10.2.8
John
> John,
>
> In MacOS 9:
>
> tell application "Finder"
> activate
> set the clipboard to the selection as text
> end tell
>
> I guess it is the same in MacoS X?
>
> Best,
>
> Mark
>
> John B. wrote:
>> Is there was way to get the path of a selected file or folder and store it
>> to the clipboard.
>>
>> Pseudo code:
>>
>> tell application "Finder"
>> set thePathName to the path of the selected item
>> end tell
>>
>> set the clipboard to thepathName
>><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Get Finder path name