Possible bug with AppScript and Excel?
Possible bug with AppScript and Excel?
- Subject: Possible bug with AppScript and Excel?
- From: Christian Prinoth <email@hidden>
- Date: Thu, 29 Jul 2010 15:43:44 +0200
Hi, I am having some problems handling axes in Excel charts via python and appscript.
I am using apple's stock python 2.6.1, appscript 0.21.1 and Excel 12.2.5 on Snow Leopard 10.6.4
Here is how I am trying to get hold of an axis:
c=app('Microsoft Excel').get_axis(app.active_sheet.chart_objects[1].chart,axis_type=k.value_axis)
now c contains
app(u'/Applications/Microsoft Office 2008/Microsoft Excel.app').active_sheet.chart_objects[1].chart.axes.ID(131073)
but if I do:
c2=app('Microsoft Excel').get_axis(app.active_chart,axis_type=k.value_axis)
apparently I get the same result, in fact c==c2 returns true. Yet, if I try to access c, I get an error, eg
In [16]: c.maximum_scale()
------------------------------------------------------------
Traceback (most recent call last):
File "<ipython console>", line 1, in <module>
File "build/bdist.macosx-10.6-universal/egg/appscript/reference.py", line 643, in __call__
return self.get(*args, **kargs)
File "build/bdist.macosx-10.6-universal/egg/appscript/reference.py", line 499, in __call__
raise CommandError(self, (args, kargs), e, self.AS_appdata)
CommandError: Command failed:
MESSAGE: The object you are trying to access does not exist
but c2 works perfectly:
In [17]: c2.maximum_scale()
Out[17]: 0.080000000000000016
Does anyone know what I am doing wrong or if there is a bug somewhere?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden