I'm trying to use Appscript to send keystrokes to iPhoto (sadly,
there's no other way to get the job done), but I can't figure out how
to make it work.  I thought it should work like this:

ipe = app("System Events").processes['iPhoto']
ipe.keystroke(u"foo")

But this yields the error:
>>> ipe.keystroke(u"foo")
------------------------------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/appscript/specifier.py",
line 203, in __call__
    raise CommandError(self, (args, kargs), e)
CommandError: Too many direct parameters: command was called on a
reference but already has a direct parameter.
        Failed command: app(u'/System/Library/CoreServices/System
Events.app').processes['iPhoto'].keystroke(u'foo')

Does anybody know the magic words?

I'm using Tiger, Python 2.3 (stock), appscript 0.13.0.

Cheers,
-n8

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to