Hello,

Has anyone successfully used appscript with omnioutliner? I'm have some problems with conduit setting domains.

The following applescript snippet works, but I haven't (as you can see below) found a similar way of doing things in appscript.

set r to row 1 of document 1
set the external id of conduit setting domain id "com.geekwerks.foo" of r to "asdasd"

The following doesn't appear to work
d = app('OmniOutliner Professional').documents.end.make(new=k.document)
r = d.rows.end.make(new=k.row)
csd = r.conduit_setting_domains[its.id=="com.geekwerks.foo"]
csd.external_id.set('asdasdasd')

The above code results in the below traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/appscript/specifier.py", line 197, in __call__
    raise CommandError(self, (args, kargs), e)
appscript.specifier.CommandError: Can't pack data into an AEDesc (unsupported type): its.id == 'com.geekwerks.foo'
        Failed command: app(u'/Applications/OmniOutliner Professional.app').documents.ID(u'dQCDauyvBm2').children[1].conduit_setting_domains[its.id == 'com.geekwerks.foo'].external_id.set('asdasdasd')

Two potential gotchas:
- OmniOutliner only allows conduit setting domains to be referenced by id
- A conduit setting domain is created the first time it is referenced; no need to 'make' it.

Does anyone have any ideas?

Thanks,

Tom
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to