Re: what the heck - text manipulation script
Re: what the heck - text manipulation script
- Subject: Re: what the heck - text manipulation script
- From: Bill Briggs <email@hidden>
- Date: Tue, 18 Jul 2006 13:57:31 -0300
Title: Re: what the heck - text manipulation
script
At 9:40 AM -0700 7/18/06, Natalie Lambert wrote:
It is supposed to be a tab between
"05" and "@St.
Louis" but that isn't really the problem. Even if I do
this....
set AppleScript's text item delimiters to
""
set x to "OCT 05
@St. Louis" as text
set v to text item 2 of x
set y to word 4 of x
return {v, y}
my result is {"C",
"St"}
why isn't the script seeing the @ and period as the
part of the word with "St"? Even if I change my
delimiters to a tab or a space the script ignores the
period and see the @ as seperate even though there are
no spaces between. I have told the script
"as Text"....
Well, if you've got tabs in there (that came through as
four spaces in the mail message), you can do this.
set oldTID to
AppleScript's text item delimiters
try
set
AppleScript's text item delimiters to {" "} -- delimiter is a tab
set
x to "OCT 05
@St. Louis" as
text
set
tempList
to text
items
of x
set
AppleScript's text item delimiters to {" "} -- delimiter is a space
set
y to tempList as
text
set wordList to
text items
of y
set
w to word 3
of y
set
t to text item 3
of y
set AppleScript's text
item delimiters
to oldTID
on
error
set
AppleScript's text item delimiters to oldTID
end
try
return {wordList,
w, t}
_______________________________________________
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