Re: faulty logic, mine
Re: faulty logic, mine
Try this:
tell application "Finder"
set selt to selection
log class of selt
set spos to position of front window
set spr0 to properties of item 1 of selt
end tell
What's happening is that finder is returning a list of items as the
selection, even if only one thing is selected, so you must refer to
the first item of the list.
You could also do this:
repeat with thisItem in selt
set spr0 to properties thisItem
end repeat
You'll notice I added a log command to your script. If you open the
apple event log in script editor before you run it, you'll see the
class of the variable selt, plus more information about the selection,
etc.
FWIW, the dictionary may not be the best place to start learning
appleScript. There are sample scripts for the finder provided in the
scripts menu and a few good books available.
HTH,
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden