Commit c15ab036 authored by Jack Jansen's avatar Jack Jansen

Updated the applescript documentation for te new framework, and replaced the...

Updated the applescript documentation for te new framework, and replaced the Eudora example with one that uses Disk Copy (which everyone running MacOS 8 or
higher should have).
parent e743c6e2
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
"""
Package generated from Macintosh HD:Hulpprogramma's:Disk Copy
Resource aete resid 0
"""
import aetools
Error = aetools.Error
import Standard_Suite
import Special_Events
import Utility_Events
_code_to_module = {
'Core' : Standard_Suite,
'ddsk' : Special_Events,
'ddsk' : Utility_Events,
}
_code_to_fullname = {
'Core' : ('Disk_Copy.Standard_Suite', 'Standard_Suite'),
'ddsk' : ('Disk_Copy.Special_Events', 'Special_Events'),
'ddsk' : ('Disk_Copy.Utility_Events', 'Utility_Events'),
}
from Standard_Suite import *
from Special_Events import *
from Utility_Events import *
class Disk_Copy(Standard_Suite_Events,
Special_Events_Events,
Utility_Events_Events,
aetools.TalkTo):
_signature = 'ddsk'
import Disk_Copy
import macfs
import sys
talker = Disk_Copy.Disk_Copy(start=1)
talker.activate()
filespec = macfs.FSSpec('my disk image.img')
try:
objref = talker.create('my disk image', saving_as=filespec, leave_image_mounted=1)
except Disk_Copy.Error, arg:
print "ERROR: my disk image:", arg
else:
print 'objref=', objref
print 'Type return to exit-'
sys.stdin.readline()
This diff is collapsed.
"""A test program that allows us to control Eudora"""
import sys
import aetools
import Eudora_Suite
import Required_Suite
import Standard_Suite
import MacOS
class Eudora(Eudora_Suite.Eudora_Suite, Required_Suite.Required_Suite, \
Standard_Suite.Standard_Suite, aetools.TalkTo):
"""A class that can talk to Eudora"""
pass
# The Creator signature of eudora:
SIGNATURE="CSOm"
def main():
talker = Eudora(SIGNATURE, start=1)
while 1:
print 'get, put, name (of first folder), list (foldernames), quit (eudora) or exit (this program) ?'
line = sys.stdin.readline()
try:
if line[0] == 'g':
talker.connect(checking=1)
elif line[0] == 'p':
talker.connect(sending=1)
elif line[0] == 'n':
id = Eudora_Suite.mailbox(1).name
name = talker._get(id, as='text')
print "It is called", name
elif line[0] == 'l':
pass
elif line[0] == 'q':
talker.quit()
elif line[0] == 'e':
break
except MacOS.Error, arg:
if arg[0] == -609:
print 'Connection invalid, is eudora running?'
else:
print 'MacOS Error:', arg[1]
except aetools.Error, arg:
print 'Eudora returned error:', arg
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment