Jump to content

Delete extra white space from clipboard?


lawonama
 Share

Recommended Posts

Right now I have the following code:

Func message()
    ClipPut("0          1           1           0           2           0           2           1")
    Sleep(250)
    StringStripWS(ClipGet(), 8)
    Sleep(250)
    Send("^v")
 EndFunc


The spaces between 0 and 1 are extra whitespace that the button "tab" does in notepad. How do I remove these from clipboard?
 

Link to comment
Share on other sites

On 11/20/2017 at 7:45 PM, mikell said:

?

Func message()
    ClipPut("0          1           1           0           2           0           2           1")
    Sleep(250)
    $s = StringStripWS(ClipGet(), 8)
    ClipPut($s)
    Sleep(250)
    Send("^v")
 EndFunc

 

Or, with one less variable:

Func message()
    ClipPut("0          1           1           0           2           0           2           1")
    Sleep(250)
    ClipPut(StringStripWS(ClipGet(), 8))
    Sleep(250)
    Send("^v")
 EndFunc

:D

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...