Author Topic: NEW USERS: Payloads -- what are they and how do I use them?  (Read 4320 times)

0 Members and 1 Guest are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
A payload is a piece of information that we (or another program) pass to our command, so that it can be used in the command.

This is distinct from regular voice command phrases, which only trigger a command.

For example, if we want VC to play a particular song in our media player, we pass the song title as a payload to the command. Otherwise, it wouldn't know what song to play.

In the command macro, these payload values are represented by placeholders. If we are passing one piece of information, that payload looks like {1}. If we need to pass 2 separate pieces of information, such as a song title and an artist's name, we can use {1} to represent the song title and {2} to represent the artist's name.

These placeholders are then replaced in the command's macro by the values we provide when we issue our voice commands (or using event payloads).

For this reason, if you don't execute your voice command properly, your command won't work: it won't know what {1}, {2}, etc. stand for unless you pass it that information.

FOR MORE INFORMATION:

Watch the video: Fireside Chat 2 for New Users - Search Wikipedia

ALSO:

Extracts from other video demos useful for new users:
 
Creating a command that uses a payload range. "Set volume to {X}."

https://www.youtube.com/watch?v=lPyfxpXRr9Q&feature=youtu.be&t=6m5s
(Early release of VC, so the interface looks slightly different)

Creating a command that uses payload XML and a payload range. "Dim {light X} to {Y}%."

https://www.youtube.com/watch?v=-M7htWfF3tQ&feature=youtu.be&t=5m56s


Making the most of Skype using payloads & Bonus: using payloads attached to events! (Good stuff.)



Documentation (with examples of different types of payloads):

For those willing to read text that is longer than a tweet (but with pictures!), see also the wiki entry:

http://voxcommando.com/mediawiki/index.php?title=Payloads

Nifty information on the wiki page that answers the question users ask a lot:

Q. "I want the TTS to say the payload phrase, not the payload value".

A. You need the "friendly payload" variable: http://voxcommando.com/mediawiki/index.php?title=Payloads#Example_of_friendly_payloads

SEE ALSO:

NEW USERS: Variables in VoxCommando --> cool things in {curly brackets}

Step-by-step tutorial. Hands-on introduction to payloads and a few other core concepts, with example command xml that you paste into your own command tree and explore.
« Last Edit: October 24, 2016, 11:18:42 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)