simply by counting because text item 2 doesn’t exists, it isn’t null if nameOfContact doesn’t contain a space
--when delimiters are set to space
if count text items of nameOfContact is 1 then
--there is no space in the name
else
--there is a space in the name
end
Not if you have you read correctly my comments in the code.
If you count text items when delemiter is set to “” (by default) it will count every character but if you set applescript’s text item delimiters to space it would count as you wished for