[Pythonmac-SIG] How to fathom appscript

Hamish Allan hamish at gmail.com
Tue Dec 19 00:11:27 CET 2006


Hi,

I'm new to appscript (and relatively new to python) and I'm having
trouble fathoming out how to determine what can be done with each type
of object.

For example,

itunes = app('iTunes')
x = itunes.sources.first.playlists[its.name.contains('MyName')]

This code fetches any playlists containing the string 'MyName'. But I
want an exact match. Using 'equals' rather than 'contains' doesn't
work. How do I find out which operations its.name supports? And more
generally, what is possible in other similar situations with different
objects?

I also want to do what the following code suggests:

x = itunes.sources.first.playlist_folders[its.name.equals('MyFolder')]
y = itunes.sources.first.playlists[its.parent.equals(x)]

Is this possible?

Many thanks,
Hamish


More information about the Pythonmac-SIG mailing list