1
VoxCommando Basics and Core Features / OSD.ShowText will not show results from Regex
« on: February 22, 2016, 12:08:33 AM »
I am honestly not sure if this is an OSD issues, a Regex issue, or a Me issue.
I started to write a plugin to trigger events on sunrise and sunset (as an experiment), but then it hit me that all the tools to do this were already there.
I could use the special google calendar for sunrise and sunset to get the time and then use regular expression to pull out the information. In testing I tried to through the results of the regex into an osd.showtext using {match.1}. The OSD box shows up on the screen, but it is solid black with no text in it. (OSD.showtext is working with other results like {lastresult}.
I used the regext tool and I do get the results I think I am going to get (namely the time).
Logfile and history both show 1 result coming back.
any thoughts?
I started to write a plugin to trigger events on sunrise and sunset (as an experiment), but then it hit me that all the tools to do this were already there.
I could use the special google calendar for sunrise and sunset to get the time and then use regular expression to pull out the information. In testing I tried to through the results of the regex into an osd.showtext using {match.1}. The OSD box shows up on the screen, but it is solid black with no text in it. (OSD.showtext is working with other results like {lastresult}.
I used the regext tool and I do get the results I think I am going to get (namely the time).
Logfile and history both show 1 result coming back.
any thoughts?
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.7-->
<command id="823" name="newcommandname" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>GgCal.GetDay</cmdType>
<params>
<param>4</param>
<param>sunrise and sunset for Philadelphia</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegEx</cmdType>
<params>
<param>\d{1,2}:\d{2}am</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>{Match.1}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</command>