Re: path to selection
Re: path to selection
- Subject: Re: path to selection
- From: Simon Brown <email@hidden>
- Date: Fri, 07 Mar 2003 12:48:49 +0000
on 7/3/03 5:03, Philippe GRUCHET at email@hidden wrote:
>
Please, let me know if it works under 9.1.
>
Thanks!
Almost...
=================
tell application "Finder"
if selection = {} then return
set {theList, AppleScript's text item delimiters, textHolder} to
{selection as list, ",", ""}
repeat with i from 1 to items's number in theList
copy ((theList's item i as alias) & return & textHolder) to
textHolder
end repeat
activate -- I added this - see next line
set the clipboard to textHolder -- OS9 - error: Must activate Finder
set AppleScript's text item delimiters to ""
display dialog (textHolder as string) buttons {"OK"} default button "OK"
end tell
=================
Worked except that the _set clipboard_ doesn't work in the background. Had
to activate Finder first.
Thanks for clarifying that you're using OSX. I don't have the hardware to
run it yet but am trying to stay in touch for the day I do.
Interesting that _if selection =1_ worked on your machine. I guessed it
implied that the default property of (Finder) selection was count rather
than value. Is that the case? Or am I just trying to (inappropriately) apply
VB concepts to Applescript?
-------------
Simon Brown
-------------
PPC 7500 + G3 card/ Mac OS z9.1 + Remote Access 4.02/CarbonLib
1.6/AppleScript 1.8.3/Smile 1.8.8
_______________________________________________
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.