• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Coerce a returned list of objects into a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coerce a returned list of objects into a string


  • Subject: Coerce a returned list of objects into a string
  • From: Matt Petrowsky <email@hidden>
  • Date: Sun, 4 Jul 2004 21:33:38 -0700

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?

Obviously,

tell application "Mail"
selection as string
end tell

does not work.

Matt Petrowsky
_______________________________________________
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.


  • Follow-Ups:
    • Re: Coerce a returned list of objects into a string
      • From: Martin Orpen <email@hidden>
    • Re: Coerce a returned list of objects into a string
      • From: Emmanuel <email@hidden>
    • Re: Coerce a returned list of objects into a string
      • From: Walter Ian Kaye <email@hidden>
  • Prev by Date: Quit Command from a Script Menu
  • Next by Date: Re: Coerce a returned list of objects into a string
  • Previous by thread: Re: Quit Command from a Script Menu
  • Next by thread: Re: Coerce a returned list of objects into a string
  • Index(es):
    • Date
    • Thread