News:

HOT TIP! Exploring the commands packaged in VC's standard configurations is a great way to learn how to build your own. You can also clone a command as a starting point: just right-click and select "Clone" (or type Alt-C).

Main Menu

Only execute macro during certain times of the day

Started by nime5ter, November 22, 2014, 09:36:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nime5ter

Quote from: achel on November 22, 2014, 08:39:56 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:

<?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
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

thanks once again  :D
I much prefer the flexibility of creating your own scenes with VC