I'm trying to use python/appscript to send apply-events to a cocoa
application, but it seems to be choking on parsing the aete... possibly
because the aeta has been replaced by 'sdef' for holding scripting
terminology.<br>
<br>
help?<br>
<pre><font size="-2">Traceback (most recent call last):<br>  File &quot;/fitEtc/PyFIT/fit/fit/TypeAdapter.py&quot;, line 758, in _compareCellToResult<br>    result = self.get()<br>  File &quot;/fitEtc/PyFIT/fit/fit/TypeAdapter.py&quot;, line 901, in get
<br>    return self.method(self.target)<br>  File &quot;/fitEtc/quickbooks_tests/test_my_automation/verify_company_file.py&quot;, line 28, in result<br>    app(self.applicationpath).open(File(self.filename))<br>  File &quot;/Library/Python/2.3/site-packages/appscript/specifier.py&quot;, line 392, in __init__
<br>    translationTables = tablesForLocalApp(path)<br>  File &quot;/Library/Python/2.3/site-packages/appscript/translationtablereader.py&quot;, line 140, in tablesForLocalApp<br>    classes, enums, properties, elements, commands = buildTables(path)
<br>  File &quot;/Library/Python/2.3/site-packages/appscript/translationtablebuilder.py&quot;, line 98, in buildTables<br>    aeteparser.parse(getaete(path), p)<br>  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py&quot;, line 254, in parse
<br>    a.list(_parseSuite, receiver)<br>  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py&quot;, line 64, in list<br>    fn(self, receiver)<br>
  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py&quot;, line 182, in _parseSuite<br>    aete.list(fn, receiver)<br>  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py&quot;, line 64, in list
<br>    fn(self, receiver)<br>  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py&quot;, line 150, in _parseComparison<br>    description = aete.string
()<br>  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py&quot;, line 48, in string<br>    count = ord(self._str[self._ptr])<br><br><br>IndexError: string index out of range
</font></pre>
------<br>
<br>
from fit.ColumnFixture import ColumnFixture<br>
<br>
from Foundation import NSString<br>
from AppKit import NSWorkspace<br>
import os.path<br>
from appscript import *<br>
from macfile import *<br>
<br>
class verify_company_file(ColumnFixture):<br>
&nbsp;&nbsp;&nbsp; _typeDict={<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;filename&quot;: &quot;String&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;applicationpath&quot;: &quot;String&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;result&quot;: &quot;String&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; filename = &quot;&quot;<br>
&nbsp;&nbsp;&nbsp; applicationpath = &quot;&quot;<br>
&nbsp;&nbsp;&nbsp; launchsuccess = 0<br>
&nbsp;&nbsp;&nbsp; def result(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ws = NSWorkspace.sharedWorkspace()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ws.launchApplication_( self.applicationpath )&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
app(self.applicationpath).open(File(self.filename))&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return None<br>
<br>
<br>