Author Topic: Only execute macro during certain times of the day  (Read 2241 times)

0 Members and 1 Guest are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Only execute macro during certain times of the day
« on: November 22, 2014, 09:36:21 AM »
Thankyou so much guys for your time.
It works a treat now.
What else I would like to do is if it's  between 12am and 6am turn off that group that handles that event, but thats probably for another post.


If it is only this one command that you want to stop between midnight and 6, you should be able to use a logic block within the command like so:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.2.1-->
<command id="291" name="test -- stop macro between midnight and 6:00" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="70" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>24,01,02,03,04,05,&amp;&amp;{DtCustom.HH}</ifParams>
    <then>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)&lt;(B)</ifType>
    <ifParams>{3}&amp;&amp;4</ifParams>
    <then>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <event>vera.Light.5.*</event>
</command>

For more info on the date/time variables: http://voxcommando.com/mediawiki/index.php?title=Variables
« Last Edit: November 22, 2014, 10:13:53 AM by jitterjames »
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)

achel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 4
    • View Profile
Re: Only execute macro during certain times of the day
« Reply #1 on: November 22, 2014, 10:53:47 AM »
thanks once again  :D
I much prefer the flexibility of creating your own scenes with VC