Re: Text Item Delimiters not working with 9.1
Re: Text Item Delimiters not working with 9.1
- Subject: Re: Text Item Delimiters not working with 9.1
- From: Michelle Steiner <email@hidden>
- Date: Wed, 8 Aug 2001 16:54:26 -0700
On 8/8/01 3:56 PM, Wadson, David <email@hidden>
wrote:
>
This snippet of code no longer works when put on a G4 running 9.1 but works
>
fine with 8.6. I've doublechecked and the text snippet is tab-delimited but
>
despite changing the delimiters of Applescript, it still comes in as one
>
line. Hence the script craps out when trying to get text item 4...
It works for me, using 9.1 and AS 1.6 on an iMac
set snippet_of_text to "one two three four five six seven eight nine"
--tabs between words
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {tab}
set current_entry_Ad_Number to text item 4 of snippet_of_text
set AppleScript's text item delimiters to oldDelimiters
current_entry_Ad_Number
-->"four"
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------