Automatic line breaks after 50 characters?
- BrittMalka
- Posts: 9
- Joined: Jul 4th, ’17, 18:12
Hi,
When I send out autoresponder emails, I copy the email text to clipboard.
Then I paste it into https://www.formatit.com and click Submit to have hard returns after each 50 characters.
Can FastKeys be set up to do the same?
I would love to be able to:
1. Copy the text to clipboard
2. Format it to 50 characters wide - perhaps by using a FastKeys shortcut.
Can this be done?
And if so, how?
(I have FastKeys v. 5.03 Pro.)
Thanks,
Britt
When I send out autoresponder emails, I copy the email text to clipboard.
Then I paste it into https://www.formatit.com and click Submit to have hard returns after each 50 characters.
Can FastKeys be set up to do the same?
I would love to be able to:
1. Copy the text to clipboard
2. Format it to 50 characters wide - perhaps by using a FastKeys shortcut.
Can this be done?
And if so, how?
(I have FastKeys v. 5.03 Pro.)
Thanks,
Britt
Sure. Create a shortcut with the script below (Type: Command). It will copy the selected text to clipboard and replace it with the formatted text.
Code: Select all
send, ^c
sleep 200
text:=""
loop, parse, clipboard
{
If (Mod(A_Index, 50) = 0)
text := text A_LoopField "`n"
Else
text := text A_LoopField
}
sendinput % text
return
- BrittMalka
- Posts: 9
- Joined: Jul 4th, ’17, 18:12
Thanks.
It didn't work that well for me.
It took this text:
People love to do the work themselves.
Funny, eh?
Instead of you taking care of printing a file, the customer prefers to do it themselves.
Printables, which can be PDF files or images, are in high-demand.
The customer gets it instantly. No waiting time. And they can print it ourselves.
But when you check printables on Etsy and other places, you’ll see that many of them are priced at $2 or $3.
Then why would anyone pay $80?
That’s what Paul Coleman set out to find out.
And he figured it took four things:
Higher perceived value.
Higher prices.
The right audience.
The right categories.
Then he gives examples and tell you how you can get those four things.
It’s not even difficult.
https://clq.cx/hvpp
***
And turned it into this:
People love to do the work themselves.
Funny, e
h?
Instead of you taking care of printing a fil
e, the customer prefers to do it themselves.
Pr
intables, which can be PDF files or images, are intables high-demand.
The customer gets it instantly. N
o waiting time. And they can print it ourselves.
But when you check printables on Etsy and other
places, you’ll see that many of them are priced at
$2 or $3.
Then why would anyone pay $80?
Theat’s what Paul Coleman set out to find out.
And he figured it took four things:
Higher perceiv
ed value.
Higher prices.
The right audience.
The right categories.
Then he gives example
s and tell you how you can get those four things.
It’s not even difficult.
https://clq.cx/hvpp
***
I tried copying with my new short cut both from ProWritingAid and Notepad++
I tried changing the short cut to another one to see if it made a difference, but it didn't.
It didn't work that well for me.
It took this text:
People love to do the work themselves.
Funny, eh?
Instead of you taking care of printing a file, the customer prefers to do it themselves.
Printables, which can be PDF files or images, are in high-demand.
The customer gets it instantly. No waiting time. And they can print it ourselves.
But when you check printables on Etsy and other places, you’ll see that many of them are priced at $2 or $3.
Then why would anyone pay $80?
That’s what Paul Coleman set out to find out.
And he figured it took four things:
Higher perceived value.
Higher prices.
The right audience.
The right categories.
Then he gives examples and tell you how you can get those four things.
It’s not even difficult.
https://clq.cx/hvpp
***
And turned it into this:
People love to do the work themselves.
Funny, e
h?
Instead of you taking care of printing a fil
e, the customer prefers to do it themselves.
Pr
intables, which can be PDF files or images, are intables high-demand.
The customer gets it instantly. N
o waiting time. And they can print it ourselves.
But when you check printables on Etsy and other
places, you’ll see that many of them are priced at
$2 or $3.
Then why would anyone pay $80?
Theat’s what Paul Coleman set out to find out.
And he figured it took four things:
Higher perceiv
ed value.
Higher prices.
The right audience.
The right categories.
Then he gives example
s and tell you how you can get those four things.
It’s not even difficult.
https://clq.cx/hvpp
***
I tried copying with my new short cut both from ProWritingAid and Notepad++
I tried changing the short cut to another one to see if it made a difference, but it didn't.
Your request was not clear. I corrected the script to only format the lines longer than 50 characters.
Code: Select all
send, ^c
sleep 100
text:=""
loop, parse, clipboard, `n
{
if (StrLen(A_LoopField>50))
{
loop, parse, A_LoopField
{
k:=A_LoopField
If (Mod(A_Index, 50) = 0)
text := text k "`n"
Else
text := text k
}
text := text "`n"
}
else
text := text A_LoopField "`n"
}
clipboard:=text
sleep 100
send ^v
return
- BrittMalka
- Posts: 9
- Joined: Jul 4th, ’17, 18:12
Thank you. That one worked much better.
Is there a way to format the lines that are longer than 50 characters to not cut through words but leave the words whole?
In the example, it gave me:
And
Is there a way to format the lines that are longer than 50 characters to not cut through words but leave the words whole?
In the example, it gave me:
Code: Select all
The customer gets it instantly. No waiting time. A
nd they can print it ourselves.
Code: Select all
Then he gives examples and tell you how you can ge
t those four things.
How about this?
Code: Select all
width:=50
send, ^c
sleep 100
text:=""
loop, parse, clipboard, `n, `r
{
i:=A_Index
if (StrLen(A_LoopField)>width)
{
spos:=1
loop
{
k:=SubStr(A_LoopField, spos, width)
if (StrLen(k)=0)
break
epos:=InStr(k, " ",, 0)
if (epos=0) or (StrLen(k)<width)
epos:=50
k:=SubStr(k, 1, epos)
spos:=spos+StrLen(k)
text := text ((i=1 and not text)?"":"`n") k
}
}
else
text := text ((i=1 and not text)?"":"`n") A_LoopField
}
clipboard:=text
sleep 100
send ^v
return
- BrittMalka
- Posts: 9
- Joined: Jul 4th, ’17, 18:12
Yes!
Perfect!
Thank you so much. This is brilliant.
Thank you so so much!
Perfect!
Thank you so much. This is brilliant.
Thank you so so much!