From: Jack Jansen Date: Tue, 1 Apr 2003 22:30:23 +0000 (+0000) Subject: The minimal scripting example now actually works. X-Git-Tag: v2.3c1~1296 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b60352992f04787fff0ac12b522000a59e92c4bd;p=python The minimal scripting example now actually works. --- diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html index 9d2fe0e103..ae9ccee881 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html @@ -14,15 +14,9 @@

Python has a fairly complete implementation of the Open Scripting Architecure (OSA, also commonly referred to as AppleScript), allowing you to control scriptable applications from your Python program, -and with a fairly pythonic interface. The following pieces of -AppleScript and Python are rougly identical (XXXX Not true right now!):

+and with a fairly pythonic interface. This piece of +Python:

-
-tell application "Finder"
-	get name of window 1
-end tell
-
-
 import Finder
 
@@ -30,6 +24,14 @@ f = Finder.Finder()
 print f.get(Finder.window(1).name)
 
+

is identical to the following piece of AppleScript:

+ +
+tell application "Finder"
+	get name of window 1
+end tell
+
+

To send AppleEvents to an application you must first create the Python modules interfacing to the terminology of the application (what Script Editor calls the "Dictionary"). Use the IDE menu command