Author Topic: Can you set a time for VC to speak to you  (Read 1877 times)

0 Members and 1 Guest are viewing this topic.

colboyxx

  • Jr. Member
  • **
  • Posts: 7
  • Karma: 0
    • View Profile
Can you set a time for VC to speak to you
« on: September 09, 2013, 04:46:10 PM »
Hi guys, just a quick question, can you set VC to ask you a question at a certain time of day,  may sound silly but I've been given some tablets I have to take at night and I wondered if I can get VC to remind me to take them if possible, thanks any help appreciated,

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Can you set a time for VC to speak to you
« Reply #1 on: September 09, 2013, 05:01:58 PM »
Sure thing. There are a number of ways. The simplest is VC.SetEventTimer. http://voxcommando.com/mediawiki/index.php?title=Actions#SetEventTimer.

Alternatively, if you happen to use Google Calendar, you could use the Google Calendar plugin actions: http://voxcommando.com/mediawiki/index.php?title=Plugin_GgCal

(Of course, if Vox isn't running at the time you're supposed to take your meds, you won't get your announcement either way.)
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Can you set a time for VC to speak to you
« Reply #2 on: September 09, 2013, 05:26:35 PM »
Here is some example code. It is a group containing two commands. The first command sets the event timer for 8:00 pm (20:00). The second command is the TTS announcement (accompanied by an OSD.ShowText message for good measure).

If you want to try using this code yourself, select all the text in the code box below, copy it (ctrl-c), open your VC tree editor, right click, and select paste to put this group into the tree.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="Reminder" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="443" name="set reminder time" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="This command is triggered by the event VC.Loaded (i.e., when VoxCommando is first launched and loaded, VC will cue the event timer called &quot;TabletTime&quot; to run at 20:00.">
    <action>
      <cmdType>VC.SetEventTimer</cmdType>
      <cmdString>8:00 PM&amp;&amp;TabletTime</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Loaded</event>
     </command>
  <command id="438" name="TTS reminder" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="This TTS reminder is triggered by the event called &quot;TabletTime&quot;, which we defined in the &quot;set reminder time&quot; command.  At the end we set a timer for 24 hours to call this command again, in case you leave VC on all the time, since the VC.Loaded event is only fired once.  I'm not sure what will happen to the timers if your computer goes to sleep though.">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <cmdString>Excuse me. It is {ShortTime}. You asked me to remind you to take your meds.</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <cmdString>Excuse me. It is {ShortTime}. You asked me to remind you to take your meds.</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.SetEventTimer</cmdType>
      <cmdString>23h 59m 59s&amp;&amp;TabletTime</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>TabletTime</event>
  </command>
</commandGroup>

edit: added a timer at the end of the reminder, that calls itself every 24 hours.
« Last Edit: October 22, 2013, 11:24:57 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

colboyxx

  • Jr. Member
  • **
  • Posts: 7
  • Karma: 0
    • View Profile
Re: Can you set a time for VC to speak to you
« Reply #3 on: September 09, 2013, 06:39:05 PM »
Hey thanks for the quick reply, that's exactly what I needed thanks for your time, your a star, cheers