Hi there, I am trying to run an script I found in http://codelemur.wordpress.com/2007/11/07/controlling-itunes-with-python-cross-platform/
The problem is that I get an error importing Foundation. Where is Foundation located and how can I include in the search path? Do I need to upgrade AppleScript? My Mac runs OS X. Thanks for the help. Omar # -*- coding: utf-8 -*- import sys from optparse import OptionParser platform = sys.platform print platform if platform == "win32": import win32com.client iTunes = win32com.client.gencache.EnsureDispatch("iTunes.Application") if platform == "darwin": from Foundation import * from ScriptingBridge import * iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes") def previousTrack(): if platform == "win32": iTunes.PreviousTrack() if platform == "darwin": iTunes.previousTrack() ...
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig