[Pythonmac-SIG] Help with using aete and Adobe Illustrator 9

Suresh L Konda slk@sei.cmu.edu
Sun, 29 Oct 2000 12:55:51 -0500


Hi,

	I followed the directions in the Mac/Demo directory and built a python
package for Illustrator's
scripting plugin using gensuitemodule.py.  Again following the
directions, I tried to get Illustrator to
respond to apple events sent from python and failed. Basically, I am
able to tell Illustrator to open
a file but none of the rest of the commands are being handled.  Here is
an (edited) interpreter session (the lines starting with "arguments" are
print statement outputs I added):

>>> import macostools;
>>> import Illustrator9
>>> import macfs
>>> sfss=macfs.FSSpec("HD:Desktop Folder:illustrator-1")
>>> dfss=macfs.FSSpec("HD:Desktop Folder:ill-1.pdf")
>>> iob=Illustrator9.Illustrator9(signature='ART5', start=1)
>>> tgt=iob.open(sfss)
>>> iob.save(sfss, _in=dfss, as='pdf')
arguments pre:  {'as': 'pdf', '_in': FSSpec((-1, 16, 'ill-1.pdf'))}
arguments post:  {'fltp': 'pdf', 'kfil': FSSpec((-1, 16, 'ill-1.pdf')),
'----': FSSpec((-1, 16, 'illustrator-1'))}
arguments post 2:  {'fltp': 'e193', 'kfil': FSSpec((-1, 16,
'ill-1.pdf')), '----': FSSpec((-1, 16, 'illustrator-1'))}
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "HD:Applications:Python
2.0c1:Mac:Lib:lib-scriptpackages:Illustrator9:Core_Suite.py", line 220,
in save
aetools.Error: (-1708, 'the AppleEvent was not handled by any handler',
None)
>>> iob.close(sfss, saving='no')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "HD:Applications:Python
2.0c1:Mac:Lib:lib-scriptpackages:Illustrator9:Core_Suite.py", line 188,
in close
aetools.Error: (-1708, 'the AppleEvent was not handled by any handler',
None)

Any suggestions as to what I am doing wrong?  Thanks in advance.

Suresh