Welcome Guest.   Make a donation to an author on the site October 31, 2014, 04:55:29 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Double to Single Space Converter  (Read 3467 times)
HOTGA
Supporting Member
**
Posts: 12


We code in peace - take us to your leader....

View Profile Give some DonationCredits to this forum member
« on: November 08, 2009, 11:05:53 PM »

Please can some one write a program to convert double and triple spaces in text copied from pdf's and word document to single space. I cut a lot of text from pdf documents into word tables and it always has double and sometimes triple spaces between the text and I have to do lots of find and replace in word to change double to single space (sometimes multiple times on the same piece of text) - use this program (http://www.freewaregenius.com/2007/07/04/clipcase/) "ClipCase" to try to this but it never works on the double spaces - HELP!!
Logged
mouser
First Author
Administrator
*****
Posts: 33,611



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: November 08, 2009, 11:32:12 PM »

you can use a clipboard tool like my Clipboard Help+Spell and define a text formatting preset to do this; then just select your text and hit a hotkey and run the text formatter on it to do what you want.
Logged
lanux128
Global Moderator
*****
Posts: 6,120



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: November 09, 2009, 01:45:50 AM »

try this AHK script to replace the unwanted whitespaces with one single whitespace. use the win+alt+v hotkey to process the clipboard and paste the content.

[copy or print]
#!v::
clipboard = %clipboard%   ; change to plain text
clipnospace := RegExReplace(clipboard, "` {2,}", "` ")
clipboard = %clipnospace%
Send ^v
Return

* whitespace_cleaner.ahk (0.52 KB - downloaded 123 times.)
Logged

HOTGA
Supporting Member
**
Posts: 12


We code in peace - take us to your leader....

View Profile Give some DonationCredits to this forum member
« Reply #3 on: November 09, 2009, 01:52:27 AM »

I have d/l'dclipboard help and spell - thanks - please tell me what type in the find and replace box of the modify format/case settings - I tried normal double space replaced with single - does not work, [:space:] replaced with [:space:][:space:] - does not work, [:space:]{2} replaced with normal space not luck! HELP (please)
Logged
HOTGA
Supporting Member
**
Posts: 12


We code in peace - take us to your leader....

View Profile Give some DonationCredits to this forum member
« Reply #4 on: November 09, 2009, 02:14:43 AM »

Cheers lanux edited the script so my single key shortcut for puretext.exe also removes all double spaces! ace..thanks for your help too mouser!
Logged
mouser
First Author
Administrator
*****
Posts: 33,611



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: November 09, 2009, 02:17:50 AM »

Ok here you go, the CHS screenshot configuration for the preset:


Even easier, just unzip this preset.format file in your C:\Program Files (x86)\Clipboard Help+Spell\PresetFormats\ directory, restart CHS, and you should now have it available without having to create and save it yourself:
* MultiSpaceToSingle.preset.zip (0.66 KB - downloaded 123 times.)
Logged
mouser
First Author
Administrator
*****
Posts: 33,611



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: November 09, 2009, 02:18:47 AM »

damn it lanux beat me to it smiley

well.. at least this will be useful for those who feel like experimenting with CHS.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.031s | Server load: 0 ]