AppleScript: word count
Hi,
Below is an excerpt from my code where I'm wanting to say that if wordStr has more than 2 words then do this thing or if it has less than/nothing then do the other thing.
I can't seem to be able to get it working correctly. Please help thanks
if wordStr is greater than (2 words) then
set vol to word 2 of textNeeded
set the clipboard tovol
tell application "Numbers" to activate
tell application "System Events"
tell process "Numbers"
keystroke "["
keystrokevol
keystroke "]"
keystroke " "
end tell
end tell
if wordStr is less than (2) then
tell application "Numbers" to activate
tell application "System Events"
tell process "Numbers"
keystroke " "
end tell
end tell
end if
end if
MacBook Pro with Retina display, macOS High Sierra (10.13.4)