item delimiters
item delimiters
- Subject: item delimiters
- From: "Ruby Madraswala" <email@hidden>
- Date: Thu, 29 May 2003 15:40:55 -0400
- Thread-topic: "idle" has different effect in X vs 9?
Hi all,
I have this script which works in some instances and all (OS 9.2):
Searches the file for keyword "SIZES" and counts number of pipes in that line.
Set keyword to "SIZES"
Set filedata to read alias myfile
Set {olddelims, text item delimeters} to {text item delimiters, keyword}
Set target line to paragraph 1 of item 2 of (text items of filedata)
Set text item delimiters to "|'
Set pipecount to (count text items of targetline) - 1
Ex:
SIZES|1|2|3|4 returns the correct value of 4
SIZES|1-2|3-4|5-6 returns 0 should return 3, only difference is the hyphen.
How can I get this to work in all scenarios and also I want to add an error message in case the keyword 'SIZES" is not found.
Thanks in advance.
Ruby
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.