• 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: Calling subroutine in a repeat block
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling subroutine in a repeat block


  • Subject: Re: Calling subroutine in a repeat block
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 26 Dec 2005 17:15:11 +0100


Le 26 déc. 2005, à 13:01, Jay Louvion a écrit :
…

on textToList(thisText, delim)
    set resultList to {}
    set {tid, my text item delimiters} to {my text item delimiters, delim}
    try
       set resultList to every text item of thisText
       set my text item delimiters to tid
   on error
       set my text item delimiters to tid
   end try
   return resultList
end textToList



Hello Jay

Neil Faiman gave you the response:

using terms from application "Mail"

	on perform mail action with messages incomingMessages
		try
			tell application "Mail"
				repeat with msg in incomingMessages
					set contentString to (content of msg) as string
					set theSubject to subject of msg
					set eventData to my textToList(contentString, tab) -- HERE added my
				end repeat
			end tell
		on error mistake
			display dialog mistake
		end try
	end perform mail action with messages

	on run
		tell application "Mail" to set sel to selection
		tell me to perform mail action with messages sel
	end run

end using terms from

on textToList(thisText, delim)
	set resultList to {}
	set {tid, my text item delimiters} to {my text item delimiters, delim}
	try
		set resultList to every text item of thisText
-- HERE, removed some lines !!
	end try
	set my text item delimiters to tid
	return resultList
end textToList

As I am a lazy guy, I think that putting an instruction once is better than putting it twice ;-)

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


References: 
 >Calling subroutine in a repeat block (From: Jay Louvion <email@hidden>)

  • Prev by Date: hdiutil burn
  • Next by Date: Re: Getting the name of selected cell (FileMaker)
  • Previous by thread: Re: Calling subroutine in a repeat block
  • Next by thread: File type and encoding rates.
  • Index(es):
    • Date
    • Thread