Author Topic: How do I have VoiceAttack tell me how much time is remaining on the Pause comman  (Read 4290 times)

stoopidsxyflanders

  • Guest
I've created a few different timers (e.g. "Set timer for 2 minutes") which simply uses the Pause command for a specified amount of time and then uses the Saying something with text to speech command to say 'Timer is up'.

I want to be able to ask VoiceAttack "How much time is remaining on the timer?" or similar, and have it tell me how long until the Pause has completed (e.g. "34 seconds remaining on timer").

How do this?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
You'll need to set up your timer command to accommodate that:
Set timer for 2 minutes
Code: [Select]
Set small int (condition) [TimerTime] value to 120
Start Loop While : [TimerTime] Does Not Equal 0
Pause 1 second
Set small int (condition) [TimerTime] value as decremented by 1
End Loop
Say, 'Timer is up'
Don't forget to check the "Allow other commands to be executed while this one is running" option.

How much time is remaining on the timer?
Code: [Select]
Say, '{SMALL:TimerTime} seconds remaining on timer'

stoopidsxyflanders

  • Guest
I love you

RedMonster

  • Guest
Pfiel's method also has the distinct advantage that it doesn't post a "Pausing for X Seconds" into the event log since each pause is only 1 second long, you're just increasing the loops remaining based on the time.