<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://jitterjames.net/voxcommandoWiki/index.php?action=history&amp;feed=atom&amp;title=Variables</id>
	<title>Variables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://jitterjames.net/voxcommandoWiki/index.php?action=history&amp;feed=atom&amp;title=Variables"/>
	<link rel="alternate" type="text/html" href="https://jitterjames.net/voxcommandoWiki/index.php?title=Variables&amp;action=history"/>
	<updated>2026-10-16T15:40:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://jitterjames.net/voxcommandoWiki/index.php?title=Variables&amp;diff=275&amp;oldid=prev</id>
		<title>James: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://jitterjames.net/voxcommandoWiki/index.php?title=Variables&amp;diff=275&amp;oldid=prev"/>
		<updated>2021-01-13T17:25:03Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:25, 13 January 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>James</name></author>
		
	</entry>
	<entry>
		<id>https://jitterjames.net/voxcommandoWiki/index.php?title=Variables&amp;diff=274&amp;oldid=prev</id>
		<title>Jitterjames: /* Misc. variables */</title>
		<link rel="alternate" type="text/html" href="https://jitterjames.net/voxcommandoWiki/index.php?title=Variables&amp;diff=274&amp;oldid=prev"/>
		<updated>2018-09-30T19:39:02Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Misc. variables&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;For more on how to use payloads and other variables, see the [[Logical Command Builder]] page.&lt;br /&gt;
&lt;br /&gt;
=Payloads=&lt;br /&gt;
Technically, payloads are not a type of variable, but in your commands the notation is similar so we list the concept here.&lt;br /&gt;
&lt;br /&gt;
A payload is a packet of information that is passed to a command when the command is triggered, so that the information can be used in the command. To access that information, the following notation is used.&lt;br /&gt;
=={1} etc.==&lt;br /&gt;
* {1} represents payload 1 (the first payload under your command in the command tree)&lt;br /&gt;
* {2} represents payload 2 (the second payload under your command in the command tree)&lt;br /&gt;
:and so on.&lt;br /&gt;
[[Payloads|More on using payloads.]]&lt;br /&gt;
 &lt;br /&gt;
=={PF.1} etc.==&lt;br /&gt;
This is the syntax for &amp;quot;friendly&amp;quot; payloads. Friendly payloads give us access to the payload phrase rather than the value. &lt;br /&gt;
&lt;br /&gt;
For example, if you have a &amp;quot;Play artist {1}&amp;quot; command that relies on artist IDs to return relevant tracks, you can use {PF.1} in your TTS.Speak action to have VoxCommando announce the name of the artist rather than the ID.&lt;br /&gt;
&lt;br /&gt;
A neat trick: If you have the &amp;quot;Show OSD on Command&amp;quot; box selected in Options, there is a neat trick to make the message more dynamic for commands that use payload XML. If you use the regular payload notation (e.g., {1}, {2}, etc.) in your command name, VoxCommando will automatically replace that value with the friendly payload when displaying the recognized command. So, if your command is named &amp;quot;Play artist {1}&amp;quot;, the OSD message will show the name of the artist when the command is recognized, rather than the artist ID.&lt;br /&gt;
&lt;br /&gt;
=={#P}==&lt;br /&gt;
Returns the number of payloads available in the current command.  This can be especially useful when your command uses optional payloads.&lt;br /&gt;
&lt;br /&gt;
=Matches=&lt;br /&gt;
&lt;br /&gt;
=={Match.1} etc.==&lt;br /&gt;
Various actions (e.g., [[Plugin_GgCal#GetToday|GgCal.GetToday]], [[Actions#RegEx|Results.RegEx]], and others) return multiple results as matches. Each individual result can then be accessed using {Match.1}, {Match.2}, etc.&lt;br /&gt;
&lt;br /&gt;
For an example of this, see the VoxCommando forum thread on [http://voxcommando.com/forum/index.php?topic=1140.0 listening to Internet radio].&lt;br /&gt;
&lt;br /&gt;
When capturing several separate patterns at once within a regular expression, all strings that are captured within parentheses will be concatenated and stored as {Match.#}. However, each captured ''submatch'' can be accessed separately as {Match.#.1}, {Match.#.2}, etc. Obviously, if your regular expression captures only one pattern, then the variables {Match.1} and {Match.1.1} will be the same string.&lt;br /&gt;
&lt;br /&gt;
For an example of using regular expression submatches, see the VoxCommando forum post: [http://voxcommando.com/forum/index.php?topic=1446.0 Enhanced regex]&lt;br /&gt;
&lt;br /&gt;
=={#M}==&lt;br /&gt;
The total number of matches returned can be accessed using {#M}.&lt;br /&gt;
&lt;br /&gt;
=={Match.Rnd}==&lt;br /&gt;
Returns a random match, assuming there are any.&lt;br /&gt;
&lt;br /&gt;
=User Variables=&lt;br /&gt;
&lt;br /&gt;
=={var.&amp;lt;varname&amp;gt;}==&lt;br /&gt;
Returns the value of variable &amp;lt;varname&amp;gt;. You can set variables using the action [[Actions#SetVa|Results.SetVar]].&lt;br /&gt;
&lt;br /&gt;
=Recent Commands=&lt;br /&gt;
&lt;br /&gt;
=={LastResult}==&lt;br /&gt;
{LastResult} will be replaced by the value returned by your last successfully executed command action.&lt;br /&gt;
&lt;br /&gt;
It is important to note that some actions do not return a result and therefore do not alter the {LastResult}.&lt;br /&gt;
&lt;br /&gt;
=={LastEvent}==&lt;br /&gt;
Returns the name of the last event triggered.&lt;br /&gt;
&lt;br /&gt;
=={LastSpoken}==&lt;br /&gt;
Returns the text of the last recognized speech input (this could be a voice command, a prefix, a dictation payload, etc.)&lt;br /&gt;
&lt;br /&gt;
=={PreviousCommand}==&lt;br /&gt;
Returns the name of the command (as it appears in the tree editor) issued prior to the current command.&lt;br /&gt;
&lt;br /&gt;
=={PreviousSpoken}==&lt;br /&gt;
Returns the complete text of the speech that was recognized (what the user said) in the command immediately '''before''' the one that is currently executing.&lt;br /&gt;
&lt;br /&gt;
=File Paths=&lt;br /&gt;
&lt;br /&gt;
=={Path.VC}==&lt;br /&gt;
Will be replaced with the correct relative path for your VC folder.&lt;br /&gt;
&lt;br /&gt;
=={Path:PFx86}==&lt;br /&gt;
Will be replaced with the correct file path to access your x86 program file directory.&lt;br /&gt;
&lt;br /&gt;
=={Path.Appdata}==&lt;br /&gt;
Will be replaced with the correct file path to access your AppData directory.&lt;br /&gt;
&lt;br /&gt;
=Date/Time=&lt;br /&gt;
Generally get replaced by Microsoft's standard date and time [http://msdn.microsoft.com/en-us/library/az4se3k1.aspx format strings].&lt;br /&gt;
&lt;br /&gt;
'''NB: Apart from DtCustom, these formats are specific to your language setting. The string formats for en-US will not necessarily be the same for fr-FR, etc. The examples below are representative, not comprehensive.''' &lt;br /&gt;
&lt;br /&gt;
Just do a quick test of your local format if you're not sure (e.g. an OSD of {ShortTime}), or look at your Windows date/time settings.&lt;br /&gt;
&lt;br /&gt;
=={LongDate}==&lt;br /&gt;
The current date, in long format.&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
Monday, June 15, 2009 (en-US)&lt;br /&gt;
&lt;br /&gt;
Montag, 15. Juni 2009 (de-DE)&lt;br /&gt;
&lt;br /&gt;
From http://msdn.microsoft.com/en-us/library/system.datetime.tolongdatestring.aspx&lt;br /&gt;
&lt;br /&gt;
The string returned by the ToLongDateString method is culture-sensitive. It reflects the pattern defined by the current culture's DateTimeFormatInfo object. For example, for the en-US culture, the standard long date pattern is &amp;quot;dddd, MMMM dd, yyyy&amp;quot;; for the de-DE culture, it is &amp;quot;dddd, d. MMMM yyyy&amp;quot;; for the ja-JP culture, it is &amp;quot;yyyy'?'M'?'d'?'&amp;quot;. The specific format string on a particular computer can also be customized so that it differs from the standard long date format string.&lt;br /&gt;
&lt;br /&gt;
=={ShortDate}==&lt;br /&gt;
The current date, in short format&lt;br /&gt;
&lt;br /&gt;
6/15/2009 (en-US) (i.e., m/dd/yyyy)&lt;br /&gt;
&lt;br /&gt;
15/06/2009 (fr-FR) (i.e., dd/mm/yyyy)&lt;br /&gt;
&lt;br /&gt;
=={LongTime}==&lt;br /&gt;
The current time, in long format&lt;br /&gt;
&lt;br /&gt;
6/15/2009 1:45:30 PM (en-US)&lt;br /&gt;
&amp;lt;br/&amp;gt;15/06/2009 13:45:30 (es-ES)&lt;br /&gt;
&lt;br /&gt;
=={ShortTime}==&lt;br /&gt;
The current time, in short format&lt;br /&gt;
&lt;br /&gt;
1:45 PM (en-US)&lt;br /&gt;
&amp;lt;br/&amp;gt;13:45 (fr-FR)&lt;br /&gt;
&lt;br /&gt;
=={DtCustom.????}==&lt;br /&gt;
Retrieve the current date and time in a custom format of your choosing.&lt;br /&gt;
See [[Custom_DateTime_codes]] for more.&lt;br /&gt;
&lt;br /&gt;
*Note that the format string should be at least 2 characters or it will be assumed that you want to use a standard format.&lt;br /&gt;
&lt;br /&gt;
=Misc. variables=&lt;br /&gt;
&lt;br /&gt;
=={CR}==&lt;br /&gt;
Will be replaced with a carriage return (line break).&lt;br /&gt;
&lt;br /&gt;
=={CHR.##}==&lt;br /&gt;
Any character can be used by replacing ## with the decimal ASCII code for the character. http://www.asciitable.com/&lt;br /&gt;
Example the ascii code (decimal) for TAB is 9 so to use a tab character in your parameters you can write {CHR.09}&lt;br /&gt;
&lt;br /&gt;
=={Empty}==&lt;br /&gt;
An empty string. Can be used to clear variables of previous data.&lt;br /&gt;
&lt;br /&gt;
=={i}==&lt;br /&gt;
When an action is repeating, {i} will start at 1 and increment each time an action is repeated. This can be combined nicely with {#M} and {#P}.&lt;br /&gt;
For example, you can set an action to repeat {#M} times, and then within the action parameters iterate through match values {Match.{i}}.&lt;br /&gt;
(See:[[Logical_Command_Builder#Actions_That_Repeat|&amp;quot;List today's meetings&amp;quot; command screenshot]]) for an example.&lt;br /&gt;
=={j}==&lt;br /&gt;
Similar to {i}. When a [[Add_Loop|loop block]] is repeating, {j} will change according to the values specified in the loop block.&lt;br /&gt;
=={LastInfo}==&lt;br /&gt;
Returns the last information or error string from the previously executed action. This value does not persist like {LastResult} does. As soon as you execute any other action, its value will change.&lt;br /&gt;
(Added in VC version 2.2.1.7)&lt;br /&gt;
=={M:&amp;lt;map name&amp;gt;.&amp;lt;key&amp;gt;}==&lt;br /&gt;
Any time you store values in a map table in VoxCommando, you can access individual values directly using a map variable. See the wiki entry on [[Maps]] for more information.&lt;br /&gt;
&lt;br /&gt;
=={Rnd.1.10}==&lt;br /&gt;
Generate a random number from 1 to 10.  You can replace 1 and 10 with any integers, as long as the first one is less than the second one.&lt;br /&gt;
&lt;br /&gt;
=={Status}==&lt;br /&gt;
The current listening mode of VoxCommando (i.e., &amp;quot;on&amp;quot;, &amp;quot;off&amp;quot;, or &amp;quot;standby&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Jitterjames</name></author>
		
	</entry>
</feed>