read the same text with random variations

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Posts: 116
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy

read the same text with random variations

Post by tsolignani » 12 Feb 2020 17:31

Good evening everyone.

Let's say I have to read a text with small variations every time, in order to avoid spam filter.

I could write the original text as something like (I have no idea that syntax could work, it's just an example).

Hallo {world,planet}

And then Automagic could fill a variable getting, say, the first time the word "world" and the second one the term "planet"...

How would you do that?

Thank you, have a nice evening.

User avatar
Posts: 2395
Joined: 21 Jul 2017 17:50

Re: read the same text with random variations

Post by Desmanto » 12 Feb 2020 19:08

Create a list and get random element from it. I use example of full sentence list.

Code: Select all

variation = newList("Hello World", "Hallo Planet", "Welcome to Earth", "Mother Earth guide me", "To the Infinity");
text = getRandomElement(variation);
You can also append append the word or part of it, just concatenate it.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200117 Official, Android Pie 9.0, Rooted.

Post Reply