Re: Unreliable Mail.app AppleScript Rules
Re: Unreliable Mail.app AppleScript Rules
- Subject: Re: Unreliable Mail.app AppleScript Rules
- From: cricket <email@hidden>
- Date: Mon, 10 Feb 2003 17:57:50 -0800
I suspect this is another case of what I've found to be a long-standing
problem with Filemaker, namely that the application seems to want to be
active and the database window where you are entering data must be
frontmost or it fails to notice incoming applescript commands. The same
doesn't appear to be true for ScriptMaker scripts, only incoming
applescripts or the Perform Applescript command within Filemaker's own
script interface.
If you drop in an activate before you create the new Filemaker Pro
record, it works every time. In my own scripting, even within Filemaker
itself, I always have to do window activation when using the Perform
Applescript command or the scripts often fail to work.
- cricket
On Monday, February 10, 2003, at 17:16PM, Matt Petrowsky wrote:
>
Here's a perplexing issue for people scripting Mail.app and FileMaker
>
Pro. Primarily for moving email messages into a FileMaker production
>
system.
>
>
After a few hours of testing with the ability to run an AppleScript as
>
a mail rule in the Mail.app application I have found some really weird
>
results.
>
>
I have setup a FileMaker Pro database that will capture incoming email
>
based on criteria within a rule. This is to be used for a
>
transactional system wherein there WILL be messages that will be
>
exactly the same or similar enough to each other that at certain
>
points the AppleScript run by the mail rule will fail.
>
>
It seems that running the AppleScript has some type of memory leak
>
based on the raw source of the message.
>
>
In order to get data into FileMaker Pro you can use a single line of
>
code, provided you know the order of fields on a given layout. The
>
code is very efficient. However, it will fail every Nth item depending
>
on what is in the incoming email message - it seems.
>
>
For example. If you run a given rule with an attached AppleScript on a
>
given message more than a certain number of times then AppleScript
>
will fail to move the information from the message to AppleScript's
>
memory then over to FileMaker.
>
>
I have attached an archive with all files needed for testing. Here are
>
the steps for setup...
>
>
1. Close Mail.app
>
2. Drag the Testing.mbox into your Mail folder in
>
~/Library/Mail/Mailboxes
>
3. Open FileMaker and open the Capture.fp5 database
>
4. Launch Mail.app and create a Mail Rule in Mail.app preferences.
>
(See Picture 1.pdf)
>
5. Attach the Demo Capture.scpt to the rule*
>
6. Select one of the messages in the Testing mailbox (there are only 4
>
of them)
>
7. With a single message selected use Apply Rules (Cmd-Opt-L) multiple
>
times on the message - more than 10
>
>
*If using FileMaker Developer you'll need to modify the tell
>
statements to "FileMaker Developer"
>
>
Notice the results I got on my machine...
>
>
XML.org Message - Misses content every other record
>
Starwood Message - Misses content every 2nd record
>
[ANN] Free FileMaker - Misses content every 5th record
>
Fwd: Rd: Mail Rules - Misses headers & content every 4th record
>
>
>
Is this a bug with AppleScript, Mail.app or FileMaker? Who knows. I've
>
attached the compressed archive (72k) to this message. If the list
>
kicks the attachment you can email me direct at
>
email@hidden you may want the code that makes it easy to
>
move email messages into FileMaker. Note: If you want to archive email
>
messages into FileMaker you ONLY need two items from the message, the
>
Header and the Content. Make FileMaker parse the sender, subject,
>
reply-to and other info from the Header. This is a thousand times
>
faster! Just a tip for those of you working with FileMaker.
>
>
Matt Petrowsky
>
>
<Capture_Test.sit>
----->
Software Entomologist Mail for Mac OS X
http://www.apple.com/macosx/jaguar/mail.html
---------->
Have you ever been chased by a giant radioactive ear of corn that
showered you with fresh-popped kernels?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.