Re: Script to Get Finder Selection?
Re: Script to Get Finder Selection?
- Subject: Re: Script to Get Finder Selection?
- From: Paul Skinner <email@hidden>
- Date: Mon, 4 Aug 2003 10:30:54 -0400
On Monday, August 4, 2003, at 09:21 AM, John Delacour wrote:
At 7:50 am -0400 4/8/03, Paul Skinner wrote:
It is possible to alter a selection and break a script.
tell application "Finder"
repeat with i from 1 to (length of (get selection))
set ls to item i of (get selection)
delay 1
say (i as text)
end repeat
end tell
That's just plain stupid! And it has nothing to do with the point I
was making. If you wanted to do what you're suggesting, you'd do it
like this:
tell app "Finder"
set n to 0
repeat with i in (get selection)
set n to n + 1
say "" & n
end
end
-- JD
I agree. It is stupid.
It was one example of how you could create the conundrum of the user
changing the selection while you operate on it.
I was trying to show that it's possible, not provide a nice code
snippet.
Your explanation of why this won't happen in a repeat loop was
accurate. Your claim that a user can't change the selection while you
operate on it was inaccurate. I was simply setting the record straight.
PS
_______________________________________________
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.