script that removes spaces between digits
-
- Posts: 8
- Joined: 30 May 2018, 03:28
script that removes spaces between digits
I need some help. I want to create a script that removes spaces between digits and is formatted after pasting it from the clipboard. Specifically from this example 1J0 127 401. I don't know how to do it
Re: script that removes spaces between digits
Only spaces between digits or generally spaces?
With this code, which gets activated with F1, AHK checks if the Clipboard contains any spaces.
Just mark all the lines and press F1.
After that, you can post the new Clipboard with Ctrl+V.
If you need some special rule which should only apply to digits, you will have to modify the script.
Regards
With this code, which gets activated with F1, AHK checks if the Clipboard contains any spaces.
Just mark all the lines and press F1.
After that, you can post the new Clipboard with Ctrl+V.
Code: Select all
F1::
Send ^c ; Copy marked lines
ClipWait, 1 ; Wait until Clipboard contains data
Clipboard := StrReplace(Clipboard, CHR(32)) ; Remove spaces
return
Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
-
- Posts: 8
- Joined: 30 May 2018, 03:28
Re: script that removes spaces between digits
Great work. Thank You
Who is online
Users browsing this forum: Google [Bot] and 272 guests