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 "/fitEtc/PyFIT/fit/fit/TypeAdapter.py", line 758, in _compareCellToResult<br> result = self.get()<br> File "/fitEtc/PyFIT/fit/fit/TypeAdapter.py", line 901, in get
<br> return self.method(self.target)<br> File "/fitEtc/quickbooks_tests/test_my_automation/verify_company_file.py", line 28, in result<br> app(self.applicationpath).open(File(self.filename))<br> File "/Library/Python/2.3/site-packages/appscript/specifier.py", line 392, in __init__
<br> translationTables = tablesForLocalApp(path)<br> File "/Library/Python/2.3/site-packages/appscript/translationtablereader.py", line 140, in tablesForLocalApp<br> classes, enums, properties, elements, commands = buildTables(path)
<br> File "/Library/Python/2.3/site-packages/appscript/translationtablebuilder.py", line 98, in buildTables<br> aeteparser.parse(getaete(path), p)<br> File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py", line 254, in parse
<br> a.list(_parseSuite, receiver)<br> File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py", line 64, in list<br> fn(self, receiver)<br>
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py", line 182, in _parseSuite<br> aete.list(fn, receiver)<br> File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py", line 64, in list
<br> fn(self, receiver)<br> File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py", line 150, in _parseComparison<br> description = aete.string
()<br> File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py", 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>
_typeDict={<br>
"filename": "String",<br>
"applicationpath": "String",<br>
"result": "String",<br>
}<br>
filename = ""<br>
applicationpath = ""<br>
launchsuccess = 0<br>
def result(self):<br>
ws = NSWorkspace.sharedWorkspace()<br>
ws.launchApplication_( self.applicationpath ) <br>
app(self.applicationpath).open(File(self.filename))
<br>
return None<br>
<br>
<br>