14. Notes
Security issues
If including user names and/or passwords in remote application URLs, please note that appscript retains these URLs in both the terminology
module's internal cache and in the app
objects created with those URLs. Security here is the user's responsibility, as it's their code that creates and retains these objects.
Event loops
Python-based applications that use a Carbon/Cocoa event loop can import the appscript
module as normal, but should not use it before the event loop has started as sending Apple events outwith the main event loop can disrupt the process's normal event handling.
GUI Scripting
Non-scriptable applications may in some cases be controlled from Python by using System Events to manipulate their graphical user interface. Note that the "Enable access for assistive devices" checkbox must be selected in the Universal Access system preferences pane for GUI Scripting to work.
AEDescs
Some applications (e.g. QuarkXpress) may return values which appscript cannot convert to equivalent Python types. These values are usually of types which are defined, used and understood only by that particular application, and will be represented in Python as raw aem.ae.AEDesc
objects. While there's not much you can do with raw AEDesc
objects within Python (it's best just to treat them as opaque types), subsequent commands can pass them back to the application for further use and/or conversion just like any other value.
Credits
Many thanks to Philip Aker, Ben Artin, Jack Jansen, Jordan K Hubbard, Bob Ippolito, Thomas Loredo, Jacob Kaplan-Moss, Georges Martin, Nick Matsakis, Larry McMunn, Chris Nandor, Chris Nebel, Matt Neuburg, Ronald Oussoren, David Person, Donovan Preston, Jon Pugh, Jay Soffian, Clayton Wheeler, Kevin Van Vechten, and all the appscript users who've provided comments, criticisms and encouragement along the way. Special thanks to those who've donated to the development and upkeep of this project.