[Pythonmac-SIG] appscript
Keith Ray
keith.ray at gmail.com
Mon Feb 20 23:35:52 CET 2006
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.
help?
Traceback (most recent call last):
File "/fitEtc/PyFIT/fit/fit/TypeAdapter.py", line 758, in _compareCellToResult
result = self.get()
File "/fitEtc/PyFIT/fit/fit/TypeAdapter.py", line 901, in get
return self.method(self.target)
File "/fitEtc/quickbooks_tests/test_my_automation/verify_company_file.py",
line 28, in result
app(self.applicationpath).open(File(self.filename))
File "/Library/Python/2.3/site-packages/appscript/specifier.py",
line 392, in __init__
translationTables = tablesForLocalApp(path)
File "/Library/Python/2.3/site-packages/appscript/translationtablereader.py",
line 140, in tablesForLocalApp
classes, enums, properties, elements, commands = buildTables(path)
File "/Library/Python/2.3/site-packages/appscript/translationtablebuilder.py",
line 98, in buildTables
aeteparser.parse(getaete(path), p)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py",
line 254, in parse
a.list(_parseSuite, receiver)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py",
line 64, in list
fn(self, receiver)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py",
line 182, in _parseSuite
aete.list(fn, receiver)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py",
line 64, in list
fn(self, receiver)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py",
line 150, in _parseComparison
description = aete.string()
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/osaterminology/aeteparser.py",
line 48, in string
count = ord(self._str[self._ptr])
IndexError: string index out of range
------
from fit.ColumnFixture import ColumnFixture
from Foundation import NSString
from AppKit import NSWorkspace
import os.path
from appscript import *
from macfile import *
class verify_company_file(ColumnFixture):
_typeDict={
"filename": "String",
"applicationpath": "String",
"result": "String",
}
filename = ""
applicationpath = ""
launchsuccess = 0
def result(self):
ws = NSWorkspace.sharedWorkspace()
ws.launchApplication_( self.applicationpath )
app(self.applicationpath).open(File(self.filename))
return None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20060220/75ef7dcd/attachment.htm
More information about the Pythonmac-SIG
mailing list