Jan Erik Moström wrote:
I'm trying to learn how to use appscript but I don't understand what
I'm missing. I want to read photo info from iPhoto and have things
working ... partly
[...]
# set ptitle to date of item 1 of the selection
# app(u'iPhoto').selection.items[1].date.get()
print 'Date : ', item.date.get()
# AttributeError: Unknown property, element or command: 'date'
The problem is the line where I try to get the date info, the first
commented line is the applescript line I'm trying to translate, the
second is what ASTranslate tells me, and the third is the error
message I get.
ASTranslate is wrong here; it should be 'date_' with a trailing
underscore, not 'date'.
In situations where application-defined terms conflict with built-in
terms (i.e. use the same keyword but a different four-char code),
appscript appends an underscore to the application-defined term to
prevent any problems.
There was a known inconsistency in how older versions of appscript
applied these escapes; that has been fixed in the latest appscript and
ASDictionary releases, but I've not had time to update ASTranslate yet.
Meantime, if in doubt, go by the appscript-style dictionary, which you
can export as HTML from ASDictionary or browse via appscript's built-
in help() method (see the appscript manual for details).
HTH
has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig