Insert random quote

Share your favorite FastKeys commands
Post Reply
User avatar
cyrilmalka
Posts: 7
Joined: Feb 22nd, ’19, 02:54

Post by cyrilmalka » Mar 11th, ’19, 11:11

Hello,

I am VERY NEW to Fastkeys.

I would like it to insert a random quote in my signature in Thunderbird.

I have a text-fil in my documents: taglines.txt

I could find a short explanation here on the forum (viewtopic.php?f=6&t=68) but I don't understand at all what I have to write where. I'm afraid I'll need a couple more details.

Anyone could give me a step by step or a link where I can find a step by step?

Thank you in advance.

Regards,

Cyril
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Mar 11th, ’19, 14:43

Two ways:

1. Add a new item, select Type: Send, select "More... button/Macros/Input selection form" and copy the lines from your file to Selections field.

2. Use the script which reads the data from your file. Select Type: Command, copy the following script into the Command field:

Code: Select all

FileRead, List, H:\data\MY DOCUMENTS\taglines.txt
Sort, List, Random
Send, % SubStr(List, 1, InStr(List, "`r`n")-1)
You may need to adjust the path in the first line and new line characters (`r`n), depending on your data format.
User avatar
cyrilmalka
Posts: 7
Joined: Feb 22nd, ’19, 02:54

Post by cyrilmalka » Mar 11th, ’19, 18:40

Tom wrote: Mar 11th, ’19, 14:43 Two ways:

1. Add a new item, select Type: Send, select "More... button/Macros/Input selection form" and copy the lines from your file to Selections field.

2. Use the script which reads the data from your file. Select Type: Command, copy the following script into the Command field:

Code: Select all

FileRead, List, H:\data\MY DOCUMENTS\taglines.txt
Sort, List, Random
Send, % SubStr(List, 1, InStr(List, "`r`n")-1)
You may need to adjust the path in the first line and new line characters (`r`n), depending on your data format.
Tom wrote: Mar 11th, ’19, 14:43 Two ways:

1. Add a new item, select Type: Send, select "More... button/Macros/Input selection form" and copy the lines from your file to Selections field.

2. Use the script which reads the data from your file. Select Type: Command, copy the following script into the Command field:

Code: Select all

FileRead, List, H:\data\MY DOCUMENTS\taglines.txt
Sort, List, Random
Send, % SubStr(List, 1, InStr(List, "`r`n")-1)
You may need to adjust the path in the first line and new line characters (`r`n), depending on your data format.
I used the way 2 and it worked.

Thank you very much.

--
Regards,

Cyril

Thou shalt keep thy religion to thyself.
Post Reply