]> granicus.if.org Git - python/commitdiff
Added a chapter on using OSAXen
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 23 Dec 1996 17:28:53 +0000 (17:28 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 23 Dec 1996 17:28:53 +0000 (17:28 +0000)
Mac/Demo/applescript.html

index 379ac60ca005dd9d73cdd2ee0de3c47193c85876..b4638d2bc7b940c6cdee0bf5a6a2a85099d90135 100644 (file)
@@ -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