Author Topic: VC.loaded  (Read 1650 times)

0 Members and 1 Guest are viewing this topic.

Hellow

  • Contributor
  • ***
  • Posts: 50
  • Karma: 0
    • View Profile
VC.loaded
« on: November 07, 2013, 05:15:08 AM »
I dont understand why the script isnt exceuted on the event. Nothing seems to happen if i do a full restart. Is this correct?

Code: [Select]
<command id="251" name="onload" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>VC.TriggerEvent</cmdType>
                <cmdString>loaded</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>PY.ExecFile</cmdType>
                <cmdString>Plugins\PY\samsung_tvremote.py</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
        </command>

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: VC.loaded
« Reply #1 on: November 07, 2013, 06:51:09 AM »
Hi Hellow, your command does following:

It create a trigger event "loaded" and then it will execute your python code - but there is no phrase or event which trigger this command.
If you want to trigger the py-code when VC is loaded, you must do following:

1. delete the first action in your command "VC.TriggerEvent"
2. create a event as command part with name VC.Loaded
3. save and restart VC

VoxCommando generate a event "VC.Loaded" after starting automatically, this will trigger you command. This is how the events in VC work.

here is the code example:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="287" name="onload" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>PY.ExecFile</cmdType>
    <cmdString>Plugins\PY\samsung_tvremote.py</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>VC.Loaded</event>
</command>


I hope this helps  ;)

Kalle
« Last Edit: November 07, 2013, 08:02:47 AM by Kalle »
***********  get excited and make things  **********

Hellow

  • Contributor
  • ***
  • Posts: 50
  • Karma: 0
    • View Profile
Re: VC.loaded
« Reply #2 on: November 07, 2013, 08:00:22 AM »
Thanks!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC.loaded
« Reply #3 on: November 07, 2013, 08:29:56 AM »
I know Kalle got you fixed up nicely but this might also help in the future.