Jump to content
Sign in to follow this  
jvnorris

[Solved]ControlSend adding extra Linefeeds?

Recommended Posts

jvnorris

Is there any way to stop it from doing this. I have a control send option and it keeps adding in extra linefeeds that i do not want or need. Is there a way to tell it to stop doing this or do I need to pocess my strings to remove them (it would be nice if there was an option for this though)

Edited by jvnorris

Share this post


Link to post
Share on other sites
AdmiralAlkex

There shouldn't be any linefeeds with your Send() unless you put one in there (try it with notepad). If you you can't fix it yourself then show us a reproducer script and someone will be able to help you.

Share this post


Link to post
Share on other sites
jvnorris

Sorry it is just control Send that appears to be doing it. I think It may also be a problem with the age of the program I am working in too. It has done this before.

I just have to work it out.

Anyone have a quick way to strip Linefeeds from a string?

Share this post


Link to post
Share on other sites
SmOke_N

StringStripWS()

or

StringReplace() :)

StringReplace($sString, @LF, "")


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
AdmiralAlkex

or

StringReplace() :)

StringReplace($sString, @LF, "")

Anyone faster/better than the other or is StringStripWS() only there to stop people from asking "hey when will you create a StringStripWS() function??"?? :)

Share this post


Link to post
Share on other sites
jvnorris

Actually found StringStripCR function worked rather nicely Still cnat figure where it is getting the extra from in the first place though. Would love to figre that out. But I got the problem solved. THanks for the direction guys.

Share this post


Link to post
Share on other sites
JRowe

search the script you're using for @CR, @LF, and @CRLF.

If those are added to any of the strings, that's where your linefeed is coming from.

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  

×