ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

T h i s i s a v e r y s h o r t s c r i p t - This is a very short script

(1/5) > >>

Contro:
Delete one space between letters in distorted text lines .

The target is select the text we want to transform and apply the measure.


Best Regards

AbteriX:
As I told you already, nobody can know which space to delete and which not.





 

Deozaan:
Couldn't this be done with "Find and Replace"?


* Select the text you want to modify.
* Do a search for " "
* Do a replace for ""
* Done.

skwire:
As I told you already, nobody can know which space to delete and which not.-AbteriX (March 10, 2017, 01:57 PM)
--- End quote ---

Actually, so long as distorted text has extra spaces between ALL characters (which includes the space character), you can make this work.  Every real space will have two spaces instead of one so you can do it like this:


--- Code: Autohotkey ---#T:: ; Windows+T hotkey.  Change as desired.{    ; T h i s  i s  a  v e r y  s h o r t  s c r i p t  ; Sample of distorted text.    ;        ^^   ^^ ^^       ^^         ^^             ; Double spaces where single spaces should be.     Clipboard := "" ; Empty the clipboard.    Send, ^c        ; Copy selected text to the clipboard.    ClipWait, 2     ; Wait for text to be put on the clipboard.        ; Transform text.    myString := Clipboard    myString := StrReplace( myString, "  ", "§" ) ; Replace all double-spaces with a temporary section (§) character.    myString := StrReplace( myString, " ", "" )   ; Collapse remaining spaces.    myString := StrReplace( myString, "§", " " )  ; Replace temporary section (§) characters with a single space.        Clipboard := myString ; Copy new string back to the clipboard.}Return
Contro, give the above AHK code a try and see if it works for you.  Again, this will only work if each real space is actually two spaces when your text is distorted.

skwire:

* Select the text you want to modify.
* Do a search for " "
* Do a replace for ""
* Done.-Deozaan (March 10, 2017, 02:10 PM)
--- End quote ---

That won't work because you will replace the necessary spaces between words, too.

Navigation

[0] Message Index

[#] Next page

Go to full version