Error getting text items

can’t seem to figure out what I’m doing wrong here

set currentStyles to {"FOO 100s color", "FOO 60s color"}
repeat with astyle in currentStyles
	display dialog ("" & astyle)
	set newStyle to "ASP" & " " & (text items 5 through -1 of astyle)
end repeat

this is the error I get
“Can’t make text items 5 thru -1 of item 1 of {"FOO 100s color", "FOO 60s color"} into type string.”

also if quit applscript an run it again it works fine

maybe a bug ???

Are you changing AppleScript’s text item delimiters in your script?

From the looks of it, you don’t even need items; Just get the text directly:

set currentStyles to {"FOO 100s color", "FOO 60s color"}
repeat with astyle in currentStyles
	display dialog ("" & astyle)
	set newStyle to "ASP" & " " & (text 5 through -1 of astyle)
end repeat

I have a sub routine that does but it sets it back

your change is working thank your