Jump to content

[Solved]ControlSend adding extra Linefeeds?


Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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??"?? :)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...