A different question (Was: Re: structured data storage?)
A different question (Was: Re: structured data storage?)
- Subject: A different question (Was: Re: structured data storage?)
- From: "Michael P. Wilson" <email@hidden>
- Date: Sat, 25 Jan 2003 13:32:55 -0500
Hmm... Here's a tangental question...
When I set a rule action to "Run AppleScript" how does the script
being executed receive the context that tripped it off? Where in the
script can I reference the particular message?
If an atomic action was set up as a rule trigger, then the looping
structure would, of course, disappear completely.
On Saturday, Jan 25, 2003, at 10:54 America/New_York, Philip Aker wrote:
On Thursday, January 23, 2003, at 07:53 AM, Michael P. Wilson wrote:
(I'm a 26 year veteran programmer, but AS is a really strange
environment, even being a perl monk and a high-end C++ weenie.)
[...]
But I'm having a bit of trouble figuring out how to store these two
tables. I don't want to rely on nonstandard software components...
I'm having a bit of trouble figuring out your request, but I believe
you could do this effectively with a combination of an AppleScript and
a Tcl script. In particular, the Tcl 'clock scan' command to convert
the AppleScript dates to an 8 byte hex format and pump the address and
the converted date into a Tcl list which can then be ordered with
'lsort -dict'. Then it's up to you to get the last ordered list item
of the same address and compare. You can do all file I/O and use
'exec' in Tcl to utilize old unix chestnuts. It also occurs to me that
since you're comfortable in C++, why not just write a tool to do the
dirty work on the files and call that via 'do shell script'.
Maybe someone else would have a suggestion for speeding up the
following Mail script:
set m_box to "Sent Messages"
set delim to quoted form of tab
tell application "Mail"
try
set acct to account 1
tell acct
tell mailbox m_box
repeat with m in messages
set reci to address of (to recipient of m) as string
set ds to date sent of m as string
do shell script "echo " & (reci & delim & ds) & " >>
~/Desktop/SentDates.txt"
end repeat
end tell
end tell
return true
on error
return false
end try
end tell
HTH,
Philip Aker
http://www.aker.ca
_______________________________________________
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.
-
"Thus nature has no love for solitude, and always leans, as it were, on
some support; and the sweetest support is found in the most intimate
friendship." - Cicero
http://radio.weblogs.com/0108194/
_______________________________________________
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.