Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
faulty logic, mine
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

faulty logic, mine



What am I doing wrong?  I have these types of problems with
applescript all the time.  I try and read the dictionary for a program
and start simple little scripts to utilize new terms.  I usually make
silly errors.  Below is my logic when reading the Finder's dictionary
and then a really simple set of instructions.  Can I get some
pointers?

(*

1)  the "application" is Finder

2)  the application contains "item" ELEMENTS

3)  "items" have PROPERTIES

4)  the application has a special specifier PROPERTY called "selection"

5)  the definition for "item" is vague or circular, it seems that the
PROPERTY  called "selection" of the application should be an "item"
thus having all properties of "item"

6)  when used this way every one of the following commented lines
produces an error

7)  what am i doing wrong, where does my train of thought contain an
error? (because I am constantly fighting my own logic when trying to
read AppleScript dictionaries to try new things)

8)  explicitly, "selection" is not an "item" and thus has no
PROPERTIES so i might not be able to get the description of the
selection of the application

*)

tell application "Finder"

activate

set selt to selection

set spos to position of front window

--set spr0 to properties of selt

--set spr1 to properties of selection

--set spr2 to item properties of selt

--set snm to displayed name of selt

--set snm to item displayed name of selt

end tell

--
Kyle Olson
 _______________________________________________
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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.