Jump to content
Sign in to follow this  

Include new line \r\n in a variable for a text area

Recommended Posts

I'm trying to enter text into a text area (_IEFormElementSetValue) that includes new line entries.

I can do this by setting the focus on the text area element and simulating key strokes including the enter key for new lines.

The problem is that the data I'm entering is built during a loop with other events happening. I'm quite certain I could still programmatically set the focus at the correct time...right arrow to get to the end of the line and enter the next line by simulating key strokes...but I'm hoping for something more elegant.

Here is what I'm trying to do in the loop

$description = $aResult[$r][1]


$description &= "\r\n" & $aResult[$r][1]


_IEFormElementSetValue ($text-area, $description)

Clearly the "rn" is not correct. Does anyone know what the string would be to cause a new line in the text area?


Share this post

Link to post
Share on other sites

Fantastic! Worked perfectly.

For anyone stumbling upon this years later...the @CRLF does not go in quotes like a string of text would.

The final code inside the loop looks like

$description &= @CRLF & $aResult[$r][1]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...