[Pyobjc-dev] NSAppleScript not returning result
Brought to you by:
ronaldoussoren
From: Bob S. <rsw...@tr...> - 2003-06-24 16:16:28
|
I'm trying to use the following python code in my PyObjC Cocoa application to get the current version of iTunes available on the user's Mac: def getITunesVersion(): strScript = 'tell application "iTunes" \n return version \n end tell" appleScript = NSAppleScript.alloc().iniWithSource_(strScript) errorDict = NSMutableDictionary.alloc().initwithCapacity_(10) result = appleScript.executeAndReturnError_(errorDict) return result However, "result" is always None when this code is run and the errorDict is empty. How do I get the return value from the script? Bob Swerdlow COO Transpose rsw...@tr... 207-781-8284 http://www.transpose.com ---------------------------------- Fight Spam! Add this link to your signature (as I did): http://wecanstopspam.org Click through to find out more. ---------------------------------- |