summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-12-23 17:28:53 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-12-23 17:28:53 (GMT)
commita742d117db32600445f2f81315c424f53f188550 (patch)
treeff6dae81e65baf59c588d8e794a7ab61c9aab355 /Mac
parenta83caa0331e591eecd75d238497b2b6ce9e8abe5 (diff)
downloadcpython-a742d117db32600445f2f81315c424f53f188550.zip
cpython-a742d117db32600445f2f81315c424f53f188550.tar.gz
cpython-a742d117db32600445f2f81315c424f53f188550.tar.bz2
Added a chapter on using OSAXen
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Demo/applescript.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/Mac/Demo/applescript.html b/Mac/Demo/applescript.html
index 379ac60..b4638d2 100644
--- a/Mac/Demo/applescript.html
+++ b/Mac/Demo/applescript.html
@@ -161,6 +161,23 @@ AppleScript calls: <CODE>MacOS.Error</CODE> is raised for
all of the errors that are known to be <CODE>OSErr</CODE>-type errors,
server generated errors raise <CODE>aetools.Error</CODE>. <p>
+<H2>Scripting Additions</H2>
+
+If you want to use any of the scripting additions (or OSAXen, in
+everyday speech) from a Python program you can use the same method
+as for applications, i.e. run <CODE>gensuitemodule</CODE> on the
+OSAX (commonly found in <CODE>System Folder:Extensions:Scripting Additions</CODE>
+or something similar), define a class which inherits the generated
+class and <CODE>aetools.TalkTo</CODE> and instantiate it. The application
+signature to use is <CODE>'MACS'</CODE>. <P>
+
+There are two minor points to watch out for when using gensuitemodule
+on OSAXen: they appear all to define the class <CODE>System_Object_Suite</CODE>,
+and a lot of them have the command set in multiple dialects. You have to
+watch out for name conflicts, so, and make sure you select a reasonable dialect
+(some of the non-english dialects cause gensuitemodule to generate incorrect
+Python code). <P>
+
That concludes our simple example. Again, let me emphasize that
scripting support in Python is not very complete at the moment, and
the details of how to use AppleEvents will definitely change in the