Testing user input...

Hi There,

Hopefully I’m missing something simple… I’m trying to test user input for new lines, \n, returns etc. I’d like to check if the user has simply pressed the return key a few times as their input.

I’ve come up with a solution that checks if the word count, of the user input, is greater than 0. This seems to work. Is this best way to check for new lines, \n, returns etc?

Thanks in advance.

Hi,

something like this?


set {text returned:textReturned} to display dialog "Enter somehing" default answer return & return
display dialog "The user entered " & (count paragraphs of textReturned) & " lines"

Thanks for the help Stefan. :slight_smile:

It looks like testing for a count greater than 1 gives me what I need.

Thanks again.