Author Topic: Ordering Actions  (Read 2912 times)

0 Members and 1 Guest are viewing this topic.

Bray90820

  • Jr. Member
  • **
  • Posts: 19
  • Karma: 0
    • View Profile
Ordering Actions
« on: June 01, 2017, 04:54:41 AM »
So I have searched all over and have not found an answer to this question. What I wanna do is first create an action then do a regular payload dictation then after the dictation is done run another action. Right now all that happens is both actions run at the same time after the voice dictation has completed
« Last Edit: June 01, 2017, 05:02:54 AM by Bray90820 »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: Ordering Actions
« Reply #1 on: June 01, 2017, 05:04:44 AM »
Hi Bray90820 and welcome to the VC-Forum.
Only to more specify your wish. You will create a command with a payload dictation which trigger a other command - right? Can you tell us a example?

Kalle
***********  get excited and make things  **********

Bray90820

  • Jr. Member
  • **
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Ordering Actions
« Reply #2 on: June 01, 2017, 05:16:48 AM »
Sorry if I m not giving you the right information but my goal is to run a CMD command to change my Tv channel then use payloadDictation with sendkeys and a payload of one to enter text into a text file then run a CMD command to change my channel again

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: Ordering Actions
« Reply #3 on: June 01, 2017, 05:42:24 AM »
Mhhh, hard for me to understand your goal  ::)


you will change your TV channel by a voice command like "switch to NBA-live" if this is done then write a spoken text with a digit in a text file (what is the background for this step?) - then run a command which change to the (same?) channel again?
Sounds for me complicated to change only to a TV channel. Maybe it is because my native language is not english - maybe you can post here your command code what you have already done for now.

here are the instruction how you can post code in the forum: http://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum

Kalle



***********  get excited and make things  **********

Bray90820

  • Jr. Member
  • **
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Ordering Actions
« Reply #4 on: June 01, 2017, 05:53:51 AM »
Here is my code and it's not the same channel it's a different channel eventually I am gonna turn this into a TV guide but this is a test case just to figure out how to organize actions

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.3.5-->
<command id="713" name="type (dication)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Launch.CMD</cmdType>
    <params>
      <param>cd C:/Users/Aaron/Alexa/Harmony/harmonyHubCLI &amp;&amp; sh C:\Users\Aaron\Desktop\ABC.sh</param>
      <param>{0}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>SendKeys</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Launch.CMD</cmdType>
    <params>
      <param>cd C:/Users/Aaron/Alexa/Harmony/harmonyHubCLI &amp;&amp; sh C:\Users\Aaron\Desktop\NBC.sh</param>
      <param>{2}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>When is </phrase>
  <payloadDictation optional="true">payloadDictation: Regular</payloadDictation>
  <phrase optional="true">On, On Next, Showing Next, Playing Next</phrase>
</command>
« Last Edit: June 01, 2017, 05:57:22 AM by Bray90820 »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: Ordering Actions
« Reply #5 on: June 01, 2017, 06:23:00 AM »
thanks for posting your example code



1.) Your command contain a SendKeys action with a payload {1} parameter. This will not work as you think, because the payload will contain the understood text from the payload dictation - which is not the needed format for the SendKeys action.

The SendKeys action emulate only keyboard presses - for example: to press Control-Shift-End use as parameter:  ^+{END}

2.) You have set the payload dictation and the last phrase "optional" which means your command will also execute if you say only: "when is" without any other words.

What do you intend with the "SendKeys" action - send text to ...

If you want write the recognized text from the payload dictation to a file, you have to use the "File.Write" action

You can do a click on the magic wand to see a description of the selected action or use our Wiki documentation: http://voxcommando.com/mediawiki/index.php?title=Actions
« Last Edit: June 01, 2017, 06:28:32 AM by Kalle »
***********  get excited and make things  **********

Bray90820

  • Jr. Member
  • **
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Ordering Actions
« Reply #6 on: June 01, 2017, 06:35:41 AM »
Actually Text input works if I have the a text editor in focus but that doesn't really answer my original question about how to do one action after a command part   

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: Ordering Actions
« Reply #7 on: June 01, 2017, 06:40:57 AM »
to execute another action/command, you can use a  VC.TriggerEvent  action in your command - http://voxcommando.com/mediawiki/index.php?title=Actions#TriggerEvent
This will generate a event which can trigger another command and can contain also payloads.
« Last Edit: June 01, 2017, 07:56:15 AM by nime5ter »
***********  get excited and make things  **********

Bray90820

  • Jr. Member
  • **
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Ordering Actions
« Reply #8 on: June 01, 2017, 06:42:56 AM »
Thanks I'll have a look at that

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Ordering Actions
« Reply #9 on: June 01, 2017, 07:26:44 AM »
I think it would help a lot if we understood exactly what it is you are trying to accomplish, but right now it is not clear at all.

Can you explain from the user's point of view what you will say and then what you expect to happen? Give us the sequence.

Why are you writing to a text file? Why are you changing channels multiple times, etc.

Maybe then we can help you.

From my probably very incorrect understanding of your original question, it sounds like you just need to use multiple voice commands instead of trying to use a single command.
« Last Edit: June 01, 2017, 10:56:18 AM by nime5ter »