summaryrefslogtreecommitdiffstats
path: root/Mac/Contrib/PythonScript/ReadMe.txt
blob: 455f12aaaffbc5dbf60c38f498beff81c2ca53e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

PythonScript
------------
v0.5 beta 1 24/04/98

author: Bill Bedford, <billb@mousa.demon.co.uk>

This suite of modules is a first attempt at writing a more user friendly 
python/appleevent interface. The files in the suite are:

PythonScript
------------

Loads three dictionaries generated by getaete into __dict__'s of three 
classes and thus gives us direct assess to all the methods in the aete.  
Each method now contains all the information needed to build apple events.

The general usage is

>>>PythonScript.PsScript(SIGNATURE, TIMEOUT, IGNORING) 

where 
SIGNATURE is the target application
TIMEOUT is in ticks
and IGNORING is a boolean and determines whether the script waits for a reply 
from the target before going on to the next event 

>>>PythonScript.PyScript(Event, Object, keywdarg1..., keywdarg2...etc)

Object is a appleevent object specifier and is of the form

PythonScript.PsClass.Class1(arg).Class2(arg)ƒ.Property()

All applescript event, class and property names are capitalised to 
distinguish them from python methods.

getaete
-------

Reads the aete of the target application and returns it as a list of three 
dictionaries, which represent all the events, properties and enumeration in 
the aete.  (the fourth dictionary, comparisons, has never been implemented 
in applescript so I have not used it) It also reads the applescript aeut 
and adds any suites that are missing (ie where the application author has 
set his suite to inherit from the aeut.)  and the applescript suite, which 
gives the language methods

printaete
---------

Produces a text file with the aete set out in a human readable form, 
similar to the Open Dictionary command in the applescript editor.


baetools, baepack, baetypes
---------------------------

These are direct equivalents of aetools, aepack, aetypes in the standard 
distribution.  Some methods and classes have been enhanced others are 
redundant

PyScriptTest, testeudora
------------------------

A couple of test scripts.  Testeudora is an updated version of the one in 
the standard distribution.
	 
	 
	 
	 
	 
Still To Do (in no particular order)
-----------

These modules are much slower than applescript.  I believe they could be 
made faster by rewriting the aete parser in getaete and/or by putting in 
some form of persistent storage so that the class dictionaries can be cached.
	 
The parsing of the appleevent replies need rewriting.

Support for the use of scripting additions.

A Python aeut needs to be written, much of the applescript one is redundant 
in python.

Probably a few other things I haven't thought of yet.