Script freezes sometimes
Script freezes sometimes
- Subject: Script freezes sometimes
- From: Christian Vinaa <email@hidden>
- Date: Tue, 6 Feb 2001 09:52:41 +0100
Hi
i have this script that makes an email out of a AW WP document and
puts a copy of the WP doc into a special COPY folder (that I later
print)
Pretty much straight forward but script freezes sometimes.
Is there something I can do scriptwise to avoid freezes.
Some error checking ? or whatever ?
here is the script:
******
on open (droppedFiles)
tell application "Finder"
set myPath to (path to me) as text
set myDelim to ":"
tokenize (myPath) with delimiters myDelim --
------------------------------------ uses ACME Script Widgets
set myPart to item 4 of result as string --
set emailA to name of first folder in folder "Emails
fra klient" of folder ,
"Breve og email" of folder (myPart) of folder
"Journalsager" --
end tell
repeat with thisFile in droppedFiles
tell application "AppleWorks"
open thisFile
set bodyText to text body of front document --
set bodySubject to name of front document --
close front document without saving
end tell
tell application "Eudora"
set newMessage to make new message at end of
mailbox "Out"
set body of newMessage to bodyText --
set field "to" of newMessage to emailA --
set field "subject" of newMessage to bodySubject --
set thePers to "Klient-mail"
set personality of newMessage to personality thePers
end tell --
end repeat
tell application "Finder"
activate
repeat with thisFile in droppedFiles
make new alias file to thisFile at folder
"Print Copy" in folder "Desk Top Folders"
end repeat
say "E-mail created. Copy 2 print folder" using
"Bruce, high quality"
end tell
end open
********
bye
Christian Vinaa