I currently have a very simple script to type out my clipboard.
+`::Send A_Clipboard
I would like to modify the script to remove trailing (and leading if it is easy enough) spaces, tabs and line breaks before typing the contents.
I have looked around online for scripts but everything I see is for AHK 1.
Removing Leading and Trailing Whitespace from Clipboard
-
- Posts: 12
- Joined: 13 Feb 2024, 13:23
Re: Removing Leading and Trailing Whitespace from Clipboard
Code: Select all
+`::Send Trim(A_Clipboard, ' `t`n`r')
-
- Posts: 12
- Joined: 13 Feb 2024, 13:23
Re: Removing Leading and Trailing Whitespace from Clipboard
When attempting to use this I receive an error that says "error: expected a string but got a func.".
What I pasted was just a single cell from excel into notepad.
What I pasted was just a single cell from excel into notepad.
-
- Posts: 12
- Joined: 13 Feb 2024, 13:23
Re: Removing Leading and Trailing Whitespace from Clipboard
Disregard, I tried again and it does work. I must have mistyped something
Who is online
Users browsing this forum: Google [Bot], hiahkforum, lexikos, Noitalommi_2, w_i_k_i_d and 52 guests