Re: structured data storage?
Re: structured data storage?
- Subject: Re: structured data storage?
- From: Philip Aker <email@hidden>
- Date: Sat, 25 Jan 2003 07:54:23 -0800
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.