Packages
Packages
- Subject: Packages
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 17 May 2002 14:29:46 -0700
How are packages made - or unmade? Only by a Cocoa IDE or can AppleScript
participate?
I was aware that they are really folders that look like files. In OS X you
can get inside by control-clicking on them and select "Show Package
Contents". (You get a folder called - yes "Contents" and everything is
stuffed inside.) Once you know what the contents are, AppleScript can
specify alias filepaths in the usual way, where the package midstream looks
like any old folder. For example, here's a package OMM that looks like a
folder:
alias "OS X HD:Applications:Mail.app:"
Look inside and you can find this "document":
alias "OS X HD:Applications:Mail.app:Contents:MacOS:Mail"
But what about this?
alias "OS X HD:Users:berkowit:Library:Mail:Mailboxes:Outbox.mbox:"
That _appears_ in the UI to be an MBOX file storing the contents of my
Personal Mailbox "Outbox". But look at the colon at the end - it's another
package! Look inside, and you get to this:
alias "OS X
HD:Users:berkowit:Library:Mail:Mailboxes:Outbox.mbox:table_of_contents"
Now what's that when it's at home? To the best of my knowledge, an MBOX file
is actually a text file in a certain format, first used in Unix mail apps.
Eudora, I believe, still gives them "TEXT" file type - improperly, but they
work. Entourage gives them the "MBOX" file type, but they will open up in a
text editor. You can open table_of_contents in TextEdit, but just see a few
funny symbols. It won't open in Tex-Edit Plus. In my Sent Items packages,
there are two additional file: 'mbox' and 'mboxSKindex', which do the same.
(The last one has masses of strange programming stuff.)
The AppleScript that ships with Entourage to import mail from Mail.app
contains the line
import theFile
which imports each of these ".mbox:" packages one by one. Entourage's
'import' command works (so far) to import normal .mbox (text) files. Now
perhaps it was specially implemented to import these "mbox:" packages too,
or maybe it just works.
But what I'm wondering is whether there's a way to convert an ".mbox:"
package to an MBOX file and, more particularly, whether you can do the
opposite: convert a regular MBOX file to one of these
table_of_contents-containing ".mbox:" packages and import it into Mail.app
that way? If i merely copy a regular Entourage-made MBOX file into Mail's
Mailboxes folder here: ~/Library/Mail/Mailboxes/ and even give it a Mail
creator in "Open with Application", nothing new shows up in my Personal
Folders when I open Mail.
--
Paul Berkowitz
_______________________________________________
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.