Author Topic: Quick input and random text  (Read 2263 times)

Ciryan

  • Newbie
  • *
  • Posts: 14
Quick input and random text
« on: October 14, 2018, 01:53:27 PM »
Hello Gary !

Is it possible to have quick input to work like the "say something with TTS" ?
For instance, right now if a text variable myVariable is equal to [Hi; Hello], with quick input i'll have [Hi;Hello] written.
I'd like to have to possibility to choose between this and a random choice between Hi and Hello.
Could you do that ?


EDIT by Pfeil: Functionality is available using the mentioned token.
« Last Edit: April 18, 2020, 12:09:16 PM by Pfeil »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Quick input and random text
« Reply #1 on: October 14, 2018, 03:39:55 PM »
You can achieve this using the "{TXTRANDOM:}" token.

E.G.
Code: [Select]
Quick Input, '{TXTRANDOM:Hi;Hello}'

Quote from: VoiceAttackHelp.pdf page 136
{TXTRANDOM:value} - This token will do a simple randomize of its text contents.
For example, a token could be used in TTS to say, 'I love {TXTRANDOM:food;animals;jewelry}' and the result would be, 'I love animals' or, 'I love food' or, 'I love jewelry'.
Note that the, 'value' portion can be another token, however, if you want to randomize randomized tokens, it is suggested that you use text value variables to store the values, otherwise it may get a little out of sorts.
Experiment with this one, since the permutations for testing are a little out there :)

Ciryan

  • Newbie
  • *
  • Posts: 14
Re: Quick input and random text
« Reply #2 on: October 14, 2018, 10:11:13 PM »
I forgot this one.
This works perfectly, thank you.