<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Hello,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Has anyone successfully used appscript with omnioutliner? I'm have some problems with conduit setting domains.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The following applescript snippet works, but I haven't (as you can see below) found a similar way of doing things in appscript.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" color="#0000FF" face="Verdana"><B>set</B></FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#408000" face="Verdana">r</FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana"><B>to</B></FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana">row</FONT><FONT class="Apple-style-span" face="Verdana"> 1 </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana"><B>of</B></FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana">document</FONT><FONT class="Apple-style-span" face="Verdana"> 1</FONT><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" color="#0000FF" face="Verdana"><B>set</B></FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana"><B>the</B></FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana">external id</FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana"><B>of</B></FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana">conduit setting domain</FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana">id</FONT><FONT class="Apple-style-span" face="Verdana"> "com.geekwerks.foo" </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana"><B>of</B></FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#408000" face="Verdana">r</FONT><FONT class="Apple-style-span" face="Verdana"> </FONT><FONT class="Apple-style-span" color="#0000FF" face="Verdana"><B>to</B></FONT><FONT class="Apple-style-span" face="Verdana"> "asdasd"</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The following doesn't appear to work</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>d = app('OmniOutliner Professional').documents.end.make(new=k.document)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>r = d.rows.end.make(new=k.row)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>csd = r.conduit_setting_domains[its.id==<FONT class="Apple-style-span" face="Verdana">"com.geekwerks.foo"]</FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana"><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>csd.external_id.set('asdasdasd')</FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana">The above code results in the below traceback:</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Traceback (most recent call last):</DIV><DIV> File "<stdin>", line 1, in ?</DIV><DIV> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/appscript/specifier.py", line 197, in __call__</DIV><DIV> raise CommandError(self, (args, kargs), e)</DIV><DIV>appscript.specifier.CommandError: Can't pack data into an AEDesc (unsupported type): its.id == 'com.geekwerks.foo'</DIV><DIV> 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')</DIV><DIV><FONT class="Apple-style-span" face="Verdana"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana">Two potential gotchas:</FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana">- OmniOutliner only allows conduit setting domains to be referenced by id</FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana">- A conduit setting domain is created the first time it is referenced; no need to 'make' it.</FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana">Does anyone have any ideas?</FONT></DIV><DIV><FONT class="Apple-style-span" face="Verdana"><BR class="khtml-block-placeholder"></FONT></DIV><DIV>Thanks,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Tom</DIV></DIV></BODY></HTML>