Output random string of text from list

Hey guys.

I run a business account on Twitter and I like to thank people for following, just so they know we are actually human.

Saying the same thing over and over gets boring so I wanted to put a number of different strings into BTT so at the push of a button it pasted in a thank you tweet.

Any idea how I would do that?
Thanks.

Hi,

Did you find a solution to this?

Years back I had written an AppleScript to generate random passwords based on a fixed set of characters, I could tweak it to paste one item from a random list of thank you messages if you need it. Do you still need this?

1 Like

Hey there, I didn't find a solution to this. It is still very much needed. Thank you!

1 Like

You can use the "run real javascript" action with a script like this:

let textArray = [
    'test1',
    'test2',
    'test3'
];

let randomNumber = Math.floor(Math.random()*textArray.length);

BTTActions.pasteString(textArray[randomNumber]);

returnToBTT('');

You can add / edit any string you want in the textArray object

1 Like

Thank you. This is perfect! You are wonderful!