parsing text / get specific item
parsing text / get specific item
- Subject: parsing text / get specific item
- From: Christian Vinaa <email@hidden>
- Date: Sun, 6 Mar 2005 20:33:42 +0100
just FYI this is how its possible to find an emailaddress in some
text as long as the address is alone on a paragraph
tell application "AppleWorks 6"
set theParas to the paragraphs of front document as list
set atSign to "@"
set emailList to {}
repeat with y in theParas
set theChars to characters of y as list
repeat with x in theChars
if x as text is atSign then
copy y as text to end of emailList
end if
end repeat
end repeat
get emailList
try
set emailAddress to item 1 of emailList as text
end try
end tell
--
Christian Vinaa
...... Meanwhile, aunt Martha, having taken a tramp in the woods,
is lying in a ditch at the edge of town .........................
_______________________________________________
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