Re: Calling subroutine in a repeat block
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