iView home page
iView Multimedia Forum Index

FAQ FAQ     SearchSearch     MemberlistMemberlist     UsergroupsUsergroups    RegisterRegister  
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Scripting iView using Python

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    iView Multimedia Forum Index -> AppleScript
View previous topic :: View next topic  
Author Message
ocroquette



Joined: 30 Jul 2005
Posts: 10

PostPosted: Sat Jul 30, 2005 3:25 pm    Post subject: Scripting iView using Python Reply with quote

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:
#!/usr/bin/python

from appscript import *

iView = app('iView MediaPro')
window =iView.windows[0]
print window.name
print window.name.get()

I get the following error:
app(u'/Users/ocroquette/Applications/iView MediaPro').windows[0].name
Traceback (most recent call last):
File "iview.py", line 10, in ?
print window.name.get()
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[0].name.get()

Any idea how I could get the catalog's name before going further?

Thanks

Olivier
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    iView Multimedia Forum Index -> AppleScript All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



  © iView Multimedia Ltd. | All Rights Reserved Privacy Policy | Copyright | Site Map