• 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
Re: list to a text representation of that list (followup)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: list to a text representation of that list (followup)


  • Subject: Re: list to a text representation of that list (followup)
  • From: yvan-koenig <email@hidden>
  • Date: Wed, 16 Mar 2005 22:13:16 +0100


Le 16 mars 2005 , à 21:20, Michelle Steiner a écrit :

try
	{{1, 2, 3}, "abc", pi, {"foo", 3, "bar"}, "z"} as integer
on error msg
	set opening to offset of "{" in msg
	set closing to my find_closing(msg)
	set list_string to text opening through closing of msg
end try

on find_closing(msg)
	repeat with i from length of msg to 1 by -1
		if character i of msg is "}" then return i
	end repeat
end find_closing


Why not:

try
	{{1, 2, 3}, "abc", pi, {"foo", 3, "bar"}, "z"} as integer
on error msg
	set opening to offset of "{" in msg
	set closing to offset of "}" in "" & (reverse of (characters of msg))
	set list_string to text opening through -closing of msg
end try

Yvan KOENIG


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: list to a text representation of that list (followup)
      • From: Michelle Steiner <email@hidden>
References: 
 >list to a text representation of that list (followup) (From: "J.C.Burns" <email@hidden>)
 >Re: list to a text representation of that list (followup) (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Entourage - moving message to folder
  • Next by Date: Re: Adding to a text file
  • Previous by thread: Re: list to a text representation of that list (followup)
  • Next by thread: Re: list to a text representation of that list (followup)
  • Index(es):
    • Date
    • Thread