Joined: 30 Jul 2005
|Posted: Sat Jul 30, 2005 3:25 pm Post subject: Scripting iView using Python
|I have written some middle-sized scripts using AppleScript.
Having a Unix/Linux background, I had some difficulties with AppleScript, I would like to port them and continue with Python.
I have installed Appscript (http://freespace.virgin.net/hamish.sanderson/appscript.html) and it works well, but I still have some difficulties with scripting iView.
Do anyone have experience and/or sample code in this area?
I have some specific questions, in case some has the answer...
- why is the dictionnary of iView as seen in the AppleScript editor not available from appscript? For example "catalog" is only available as "windows"
- with the following script:
from appscript import *
iView = app('iView MediaPro')
I get the following error:
Traceback (most recent call last):
File "iview.py", line 10, in ?
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/appscript/specifier.py", line 179, in __call__
appscript.specifier.CommandError: Application error -1728 (Can't get reference.)
Failed command: app(u'/Users/ocroquette/Applications/iView MediaPro').windows.name.get()
Any idea how I could get the catalog's name before going further?