In article <[EMAIL PROTECTED]>, tom wible <[EMAIL PROTECTED]> wrote: > btw, i figured out why i wasn't getting any mail from crontab: no > output...d'oh!-} but i can't figure out how to get useful info out: > >>> print > app(u'/Applications/EyeTV.app').window[its.name.beginswith('EyeTV')].close() > > returns [None] no matter whether there is or isn't an EyeTV window...
It's up to the application to decide what it wants to return. In this case, it appears EyeTV returns nothing in response to a close. One of the joys of dealing with scriptable applications, regardless of the scripting language (py-appscript, Applescript, etc.), is figuring out the application's object model and how its objects respond to various commands. You can use introspection tools like appscript's help() method, ASDictionary.app, or Apple's Script Editor.app to get at an application's script dictionary. But you'll have to experiment a bit to see how the application actually responds in practice. For example, the EyeTV application object has a property "playing": etv = app('EyeTV') if etv.playing(): for window in etv.player_windows(): window.close() Hope that helps. -- Ned Deily, [EMAIL PROTECTED] _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig