|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
At 09:33p -0700 07/04/2004, Matt Petrowsky didst inscribe upon an electronic papyrus:_______________________________________________
I am working on a tool to archive email from Mail.app and was wondering if anyone knows if you can coerce a list of objects into their string equivalents - at least as it is returned in Script Editor.
For example, you run this
tell application "Mail"
selection
end tell
You get this.
{message 22 of mailbox "Deleted Messages" of account "ISO" of application "Mail", message 57 of mailbox "Deleted Messages" of account "ISO" of application "Mail", message 86 of mailbox "Deleted Messages" of account "ISO" of application "Mail", message 99 of mailbox "Deleted Messages" of account "ISO" of application "Mail"}
Which is the english version of all the pointers to objects. But my goal is to get this english output as a string. Such as
message 22 of mailbox "Deleted Messages" of account "ISO" of application "Mail"
message 57 of mailbox "Deleted Messages" of account "ISO" of application "Mail"
message 86 of mailbox "Deleted Messages" of account "ISO" of application "Mail"
message 99 of mailbox "Deleted Messages" of account "ISO" of application "Mail"
Anyone know if this can be done?
Hi Matt. Try this:
tell application "Mail"
try
selection as application --sure to error ;)
on error errm
set errm to text 12 thru -16 of errm
end try
end tell
You will need to parse the result as well as perform substitutions of terminology for the classes 'mssg', 'mbxp', etc.
But that's how you do it. :-)
cheers,
-Walter
still vehemently opposed to text/html and multipart/alternative email
_______________________________________________
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.
| References: | |
| >Coerce a returned list of objects into a string (From: Matt Petrowsky <email@hidden>) | |
| >Re: Coerce a returned list of objects into a string (From: Walter Ian Kaye <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.