Starts with any item in x

Why this dont work. I try to avoid repeat loop to keep it as fast as possible.

set testing to "test1 aslj alksjdf lkfja"
set start_list to {"test1 ", "something4"}
if testing starts with any item in start_list then beep

it doesn’t work, because AppleScript has no idea what any item is.
Try this:

set testing to "test1 aslj alksjdf lkfja"
set start_list to {"test1", "something4"}
if {word 1} of testing is in start_list then beep

Sorry my example code was not accurate enough so that dont work, i tried “all words of testing” but it fails too. Some thing like “starts with” would be best if it is possible.

set testing to "Title starts - Title here"
set start_list to {"Title starts - ", "Another type of title starts: "}
if all words of testing is in start_list then beep

threre is no all keyword in AppleScript, you should read the dictionary, dear :wink:

This works for your example without any repeat loop:

set testing to "Title starts - Title here"
set start_list to {"Title starts - ", "Another type of title starts: "}

set {TID, text item delimiters} to {text item delimiters, " - "}
set testing to text items of testing
set text item delimiters to TID
if item 1 of testing is in (start_list as text) then beep