Within filemaker pro I have a field with a series of numbers separated by spaces this format feeds into an XMchart plugin which works fine.
The next stage is to find the max and minimum value of this array, string field etc.
This applescript is a simplified version of the one I am trying within Filemaker or as a standalone in applescript:
set wordnumber to 1
set max1 to 0
set string1 to “0.98 .98 34” (usually loaded from filemaker field)
repeat 3 times
set number1 to number wordnumber of string1
display dialog number1
if max1 is less than number1 then
set max1 to number1
end if
set wordnumber to wordnumber + 1
end repeat
The problem I believe I have is with the text delimiters, the second word is extracted as 98 instead of .98
I have messed with:
set olddelims to applescripts text delimiters
replace all" "s to “@@” etc
I can not get the find and replace to work applescript for dummies, well!
set applescripts text delimiters to “@@” and tried this which I found macscripter
search String1 with find attributes {find text:" “} with change attributes {change text:” @@"}
There may be a simpler way to effectively change this to a list of numbers.
Thanks in advance if anyone knows the answer.
Roger