Author Topic: make a comand that will repeat commands X times  (Read 2833 times)

Pesoen

  • Guest
make a comand that will repeat commands X times
« on: September 29, 2017, 02:15:21 PM »
i am trying to make so i can say a command, and say a number after it, to have it repeated that amount of times. is this possible?

my command structure where i want to do this is, i have a prefix "Music" and then Suffix is the command to execute "play" "next" and so on, and i want to add another suffix, with a number, that will repeat the command that was said before it.

is this possible? i can upload my profile if it can help, as its pretty simple, but it works for what i am doing.(which is trying out stuff, and having voice commands for music mainly, and other features as i go along)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: make a comand that will repeat commands X times
« Reply #1 on: September 29, 2017, 10:12:38 PM »
The prefix/suffix system can only handle one of each type per spoken combination, however you can use dynamic command sections on either side.

E.G. in your case you'd want a suffix like "next [2..10]", which would allow repeating from twice to ten times.

If you want the command to repeat, you can use the For loop implemented in v1.6.5:
Code: [Select]
Start Loop : Repeat [{TXTNUM:"{SUFFIX}"}] Times
End Loop

Pesoen

  • Guest
Re: make a comand that will repeat commands X times
« Reply #2 on: October 08, 2017, 03:41:52 AM »
will try looking into that then.. was hoping to have a simple way to get it done, but i guess nothing in life is easy :) thanks for the reply though. just hope i can get it to work how i want it.