Jump to content
Sign in to follow this  
lawonama

Delete extra white space from clipboard?

Recommended Posts

lawonama

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?
 

Share this post


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

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  

×