Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - nime5ter

Pages: 1 2 [3] 4 5 ... 8
31
Integration Ideas / MOVED: Using Tasker with VoxCommando
« on: August 19, 2015, 06:44:36 PM »

32
Arduino support / Arduino documentation on the VoxCommando wiki
« on: July 31, 2015, 04:58:36 PM »
Communicating between VC and your Arduino via your PC's serial port: http://voxcommando.com/mediawiki/index.php?title=Arduino

You'll need to use VC's Python plugin: http://voxcommando.com/mediawiki/index.php?title=Python

35
Feature Requests / MOVED: Arduino Plugin
« on: July 31, 2015, 04:16:24 PM »

36
Off Topic (not related to VC) / MOVED: arduino issues
« on: July 31, 2015, 04:08:06 PM »

39
This question about how to control web-enabled home automation devices has been split from a non-support-related General Discussion on a different subject matter, and is now located on the Command Builder Reference support board.

http://voxcommando.com/forum/index.php?topic=2256.0

40
General Discussion / MOVED: LG TVs
« on: May 20, 2015, 02:30:40 PM »

42
XML Exchange / Basic maths with Python -- Times tables quiz
« on: May 09, 2015, 03:17:17 PM »
"Fun" for the kids. You must have VC's Python plugin enabled.

Quiz them on their multiplication tables (currently the command will test them on their 1 to 15 times tables -- easy to change):

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.6-->
<commandGroup open="True" name="math magic the Python way" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="681" name="Kids quiz -- 15 times tables" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>Great idea. How about this one?|OK. Are you ready?</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>question</param>
        <param>{Rnd.1.15} * {Rnd.1.15}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>What is {var.question}?</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>What is {var.question}?</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result={var.question}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>answer</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Give me a math challenge, I want to practice my times tables</phrase>
    <phrase optional="true">please.</phrase>
  </command>
  <command id="693" name="Here is my answer" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>Your answer was {1}.|You think the answer is {1}?|Sounds like your response was {1}.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>Your response: {1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)==(B)</ifType>
      <ifParams>{1}&amp;&amp;{var.answer}</ifParams>
      <then>
        <action>
          <cmdType>OSD.AddText</cmdType>
          <params>
            <param>That's right! {var.question} = {var.answer}. </param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>{var.question} = {var.answer}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Great job!|Nice work.|Good stuff.|You're on a roll.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>OSD.AddText</cmdType>
          <params>
            <param>Oops. {var.question} = {var.answer}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Whoops.|Not quite.|That's incorrect, unfortunately.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>{var.question} = {var.answer}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>My answer is, The answer is</phrase>
    <payloadRange>1,225</payloadRange>
  </command>
</commandGroup>

43
This topic has been moved to Command Builder Reference.

http://voxcommando.com/forum/index.php?topic=2158.0

This was a command-building support question, not an integration idea.

44
Why do we care about variables?

Let's say I want VoxCommando to tell me the time. When writing my command, my watch tells me it's 9:00 AM. Obviously I don't want to write a command rule that says:

"The time is 9:00 AM".

Instead, I will use a standard variable that always returns the current time.

"The time is {ShortTime}."

This happens to be a variable that is already created for us to make our lives easier. We don't have to create it ourselves, we can simply look up the variable name and put it to use. In fact, there are a variety of built-in time and date variables, depending on how we want to format that information.

Consult the Variables page of the wiki to see a full list of built-in variables.

Other ways to find variable names

When you are building your commands in the macro builder (LCB), there are several tools to help you find the variable you're looking for:

* When entering values in relevant fields, the auto-complete will show a list of common variables when you start by typing "{"
* The parameter helper tool in the LCB also gives you access to variable names.
* If you look up action descriptions, the descriptions explain what variables are relevant for the action you are trying to use.

Commonly encountered variables

You can learn more about these and other variables by using the program, looking at existing commands in your configuration, consulting the wiki, and watching various video tutorials.

*{LastResult}
*{PF.1},{PF.2}, etc.
*{Match.1}, {Match.2} etc.
* {#M}, {#P}
*{1},{2}, etc. (Technically, these symbolize "payloads", not variables. There is an important distinction, but the notation in your command is similar so I include the reference here.)

Here's a fun built-in variable

Did you know there's a variable in VC that serves as a random number generator? (integers only!)

{Rnd.1.100} will return a random integer value between 1 and 100. You choose the number range.

Create your own variable

The action Results.SetVar allows you to create your own variable name and pass it a value, which you can then use globally -- not only in that specific command, but any command.

This means you should be careful not to use the same variable name to represent different things in different commands!

Your custom variable can then be accessed as {var.yourvarname}

These variable values are volatile and are stored only as long as VC is running. If you wish to store an enduring value (e.g. an API key or IR code), you can store that information in a map table and access it using map variables.

Plugins

Note that some of the plugins also use their own special variables. These are not listed on the main variables page of the wiki, but they are documented in the plugin's action descriptions within VoxCommando, and elsewhere in the wiki documentation.

In Sum

Variables store information that can change over time, based on changing conditions.

  • The {ShortTime} value changes because time moves on.
  • {LastSpoken} will always return the text of the most recently recognized speech.

You might find it helpful to think of {curlybrackets} as a placeholder in your command macro. {curlybrackets} will be replaced with the information that we ask VC to retrieve at that given point in time.

In other words, the value can vary depending on the conditions we set and what we ask VC to do. ("Ahhh. Variable -- I get it now." ;-p)

45
General Discussion / MOVED: Regex Results
« on: April 28, 2015, 03:00:38 PM »
This topic has been moved to the Support Board >> RegEx (Regular Expressions).

http://voxcommando.com/forum/index.php?topic=2135.0

Support questions should not be posted under "General Discussion".

Pages: 1 2 [3] 4 5 ... 8