Thanks for the explanation James. I having another issue and figured it was related to what we are talking about so I included it here.
So earlier in this thread I posted code to blank a variable, show that it blanked the value, then assign a value and show the new value. Each time the command is executed it blanks it, and it works with no problem. Then later on in the night I found code to ping a ip and TTS speak if its working or not, and that works fine with no problem. The issue came up when I went back to run the variable code again. It would not blank. Below is the code, let me know if there is something I am doing wrong.
In order to replicate, launch the "variable test" command first, it will work. Then run the "Ping" command, that will work, then re-run the "variable test" command and the variable will now be set to the ping results and will ignore the blanking.
A note neither command references the same variables nor are they in the same command group (I combined them here just to paste easier).
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.0.0-->
<commandGroup open="True" name="Issue" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="215" name="variable test" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>a1</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Before: {var.a1}.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>a1</param>
<param>{1}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.AddText</cmdType>
<params>
<param>After: {var.a1}.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>variable test</phrase>
<payloadDictation>payloadDictation: Regular</payloadDictation>
</command>
<command id="420" name="Ping" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Launch.Capture</cmdType>
<params>
<param>C:\Windows\System32\ping.exe</param>
<param>8.8.8.8</param>
<param>True</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegEx</cmdType>
<params>
<param>bytes=(.)* time(.)*ms </param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>laptopOn</param>
<param>{#M}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)==(B)</ifType>
<ifParams>{var.laptopOn}&&4</ifParams>
<then>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<params>
<param>It's working.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<params>
<param>There is a problem!</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<phrase>run ping test</phrase>
</command>
</commandGroup>