Jump to content
Sign in to follow this  
MJJKINGISBACK

CONTROLSEND AND THE LINEFEED

Recommended Posts

MJJKINGISBACK

Hi guys

This should be an easy one to solve,

can you tell me how to send a linefeed to notepad

when sending a number of strings so each will appear on a seperate line

I know I can use controlsend with the edit flag to prevent it clearing what is already there

but what do I send to make it start a new line?

I assume the @LF comes into play, but I dont know how to add this to either a string or the end of

a controlsend command in order to take a new line

The helpfile does not explain the usage of @LF or @CF maybe someone here can

Cheers

Neil

Share this post


Link to post
Share on other sites
ofLight

ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window"&@CRLF)


There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Share this post


Link to post
Share on other sites
danielkza

For the record,windows uses CR+LF(@CRLF) as the end-of-line divisor,and they count as 2 characters.Linux-like OSes use only LF(@LF),and Mac OS 9 and older use only CR(@CR).

Share this post


Link to post
Share on other sites
MJJKINGISBACK

ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window"&@CRLF)

Thanks how would the line change if that was a string held in a variable

i.e

$message = "This is a line of text in the notepad window"

ControlSend("Untitled", "", "Edit1", $message, (how to end this line now?) or do I have to start another controlsend?

Cheers

Neil

Share this post


Link to post
Share on other sites
danielkza

Thanks how would the line change if that was a string held in a variable

i.e

$message = "This is a line of text in the notepad window"

ControlSend("Untitled", "", "Edit1", $message, (how to end this line now?) or do I have to start another controlsend?

Cheers

Neil

$Line1 = "This is the First Line"
$Line2 = "This is the second line"
MsgBOx(0,"Test",$Line1 & @CRLF & $Line2)

Share this post


Link to post
Share on other sites
MJJKINGISBACK

Thanks guys

thats perfect appreciate the quick response too :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.