Author Topic: Launching shortcuts from the {Path.VC} Questions  (Read 6130 times)

0 Members and 2 Guests are viewing this topic.

PointCloud

  • Jr. Member
  • **
  • Posts: 9
  • Karma: 3
    • View Profile
Launching shortcuts from the {Path.VC} Questions
« on: December 15, 2013, 12:06:20 PM »
Hello folks I have a questions regarding file paths, shortcuts and VC capabilities.

So to start off my purpose for asking these questions.

I have worked very hard over the last year to collect and create a list of applications that all can be ran off a usb stick.  I have replaced almost all applications that require that they be installed on the system in order to work.  The purpose is to have the freedom of being able to just bring a usb stick to any windows computer and have my entire tool set there and to eliminate clutter in the reg/hardrive.  There are way to many time saving benefits and so forth to this kind of environment.  Time is money and life is short. So.....

My question is can you launch a shortcut by it's name with VC verses the path the shortcut is taking to the file?   So if I have let's say I have Vox and Chrome for example on a Usb drive Z.   I have chrome in a portable apps folder and I have a shortcut for Chrome in the Vox folder.  It would far easier to make a shortcut and just drop it in the Vox directory rather then create a command for every new program I have acquired.

Using a command in Vox looking kinda like this
Launch| {Path.VC}{1}
So I could say Open(phrase) followed (shortcut name/payload) and vox would only have to search it's own directory for the (shortcut name/payload) letting the shortcut do the work of finding the program on the drive on drive Z.  This would make it simpler to create a launch command for new programs installed on that drive.  All that would have to be done is creating the shortcut for new programs and droping them into the Vox directory.

BTW I have tried this setup already on my own but I can't get it to work.  I even tried the select file in the command wizard with launch and it gives me the path and not the shortcut name.

So is this possible with Vox or does anyone have a suggestion/alternative solution? 
In the meantime I am creating program in AutoHotkey to create a stand alone exe fast that acts like a shortcut so I could use it with Vox.  Just in case that it is not possible.

Anyways thanks for your time. :)

Cheers!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #1 on: December 15, 2013, 12:56:08 PM »
Hi PointCloud and welcome to the forum.

What you want to do is quite simple.  You can use the launch action and give it the name of the shortcut file.  So if you create a shortcut in your VC folder and name it test then you can use a simple Launch action with the shortcut's filename.  In this example the filename of the shortcut will be "test.lnk"

It is true that trying to use the "browse file" button on the parameter helper will return the path to the actual program and not the path to the shortcut file.  That is a windows issue and has nothing to do with VoxCommando.

Here is a sample command that launches the "test" shortcut if it is in the VC root folder.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="1168" name="launch test shortcut" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Launch</cmdType>
    <cmdString>test.lnk</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>launch test shortcut</phrase>
</command>

You can copy the xml above and paste it into a group in your VC command tree.

I don't recommend that you put your shortcuts directly into the VC folder.  Probably you can create a subfolder that contains all your shortcuts so as not to clutter up your VC folder.  This will make it easier in the future if you create other custom setups, or do updates etc.
« Last Edit: December 15, 2013, 01:44:33 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #2 on: December 15, 2013, 01:31:17 PM »
Here is a group that will pretty much take care of everything for you.

1 - Create a subfolder in your VoxCommando folder and name it shortcuts
2 - Put all the shortcuts you want to in there.  Be sure to rename the shortcut if necessary to something will be easy to pronounce and will work as phrases.  If you have name where you actually want to say the letters, then you should put spaces between them.  For example, I have a voip program called 3CIX.  I like to say it as 4 words (3 see eye ex) so I should name the shortcut "3 C I X".  Or if you wanted to say "3 six" then you should name the shortcut that way.
3 - Copy and paste the xml below into your command tree, save and close your tree and wait for VC to build the new group.
4 - say "update shortcuts"

Your payload XML file will be created automatically and now you can say...

"launch X"

...where X is any shortcut name you have created.

Any time you add new shortcuts you just need to execute the "update shortcuts" command.


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="shortcuts" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1168" name="launch {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch</cmdType>
      <cmdString>{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>launch</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">shortcuts\shortcuts.xml</payloadFromXML>
  </command>
  <command id="1167" name="update shortcuts" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>File.GetFiles</cmdType>
      <cmdString>shortcuts\&amp;&amp;*.lnk</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <cmdString>shortcuts\shortcuts.xml</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <cmdString>Creating payload with {#M} shortcuts</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.MatchToEvent</cmdType>
      <cmdString>shortcut.add</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.RestartQuick</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>update shortcuts</phrase>
  </command>
  <command id="1173" name="add shortcut to payload" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.RegEx</cmdType>
      <cmdString>\\(.*?).lnk&amp;&amp;na&amp;&amp;{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.AddText</cmdType>
      <cmdString>{Match.1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <cmdString>shortcuts\shortcuts.xml&amp;&amp;{1}&amp;&amp;{Match.1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>shortcut.add</event>
  </command>
</commandGroup>
« Last Edit: December 15, 2013, 01:43:09 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #3 on: December 15, 2013, 01:34:26 PM »
You could also use the VCFileScanner program which is available in the VoxCommando Extras which you can download here: http://voxcommando.com/downloads.asp

This program will let you scan a folder (and optionally all its subfolders) using any file extension as a filter, and it will create the payload XML file for you.  The disadvantage of using this method is that you will need to do it all manually every time you run the program, specifying what you want to do in the GUI.

PointCloud

  • Jr. Member
  • **
  • Posts: 9
  • Karma: 3
    • View Profile
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #4 on: December 15, 2013, 02:39:49 PM »
Note: I went to post this reply and you may have already posted an answer for it. LMAO but for the sake my hands I will post it.  I will post back after I work though your most current post James and Thank you again for all your help

Thanks for you help James.  I could not get them to launch which confused me cause in my mind it should be simple.  It was because I wasn't using the the .ink.  I had no intentions of using the .ink cause it would defeat what i was trying to do.  Though your help did show me that cool feature of just pasting in the window which will prove extremely useful in the future.

What I am attempting to do though is kinda like how you would do with dictation.  I was trying to mimic the example you put in one of your videos but doing it with launch and not dictation.   Thus removing the need of doing anything other than making the shortcut naming it and placing it in the directory. One command to script vs 1 for every shortcut.  So it would be like (Phrase) Run (shortcuts name/Payload) without the .ink. then it looks in the directory specified in the command for a shortcut named what you dictated to Vox.  Then let's say you don't have shortcut named what you dictated using a if statement to return a TSS speech or OSD of not found.  If it can I could create functions dealing with automation wrapped inside of standalone exe I made to write code through dictation.

Thanks for the help and i truly believe your software is a solid answer to voice automation problems.  Every single company trying to bring voice commands to market have a lot to learn from you.  I have tried almost every single version of google, dragon,android, microsoft, and ardrino dictation and none come close IMHO to what is possible with your software.  I am literally designing an entire home automation environment with your software playing a core part in the back bone of it.  That is for another conversation though LMAO. Do you folks do google hangouts?  It would be cool to pass around ideas and things dealing with VC and automation like a Collaboration think tank.

Cheers!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #5 on: December 15, 2013, 03:30:20 PM »
... It was because I wasn't using the the .ink.  I had no intentions of using the .ink cause it would defeat what i was trying to do.

...Do you folks do google hangouts?  It would be cool to pass around ideas and things dealing with VC and automation like a Collaboration think tank.

The file extension is LNK with an 'L' as in "LINK" not with an 'I' as in "INK".

Sure we do hangouts now and then.  I tried to set up weekely hangouts but I lost interest because they were not productive.  Not very many people were showing up and most that did were mostly just interested in socializing.  If people want to organize a hangout some time for a particular topic, or if someone has a lot of questions I would be happy to attend a hangout.  ;D

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #6 on: December 15, 2013, 03:39:10 PM »

What I am attempting to do though is kinda like how you would do with dictation.  I was trying to mimic the example you put in one of your videos but doing it with launch and not dictation.

I think you mean to use a dictation payload with a launch action, instead of with keyboard emulation actions.

You did not mention dictation in your first post.  Now that you do mention it, your first post makes more sense to me.  Anyway, you can use a dictation payload with the launch action.  You would simply need to write the paramter for the Launch action as:
Code: [Select]
{1}.LNK
The problem with doing it this way though is that it will probably get the spelling of the shortcut filename wrong quite often.  It is much better to use a payloadXML or at least a payload list.

PointCloud

  • Jr. Member
  • **
  • Posts: 9
  • Karma: 3
    • View Profile
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #7 on: December 15, 2013, 04:32:10 PM »
THANK YOU!!!!!  Holy crap that function work well.  ;D I think you could replace the launch in your default load out on installation and use that instead on future releases. The launch on the default didn't work for me at all which started the idea in the first place. In all seriousness if people understood the importance of time they would be actively looking for a software such as yours.

Sure we do hangouts now and then.  I tried to set up weekely hangouts but I lost interest because they were not productive.  Not very many people were showing up and most that did were mostly just interested in socializing.  If people want to organize a hangout some time for a particular topic, or if someone has a lot of questions I would be happy to attend a hangout.  ;D

Well if you ever need to toss around ideas let me know and whatever your definition of productive is I will meet your expectations.  I can not stress this enough.  It is the least I can do.  I literally understand how much Time you saved me today.  I see huge potential in the software you have created.  I have hundreds of ideas and projects when it comes to automation from using raspberry pi, android devices, adrino projects, coding, and so forth.  I want to make things such as this my profession.  I have been researching, tinkering and creating things dealing with living better. A company can buy a robot/write a software to take a job away and destroy the livelihood of a person and not blink a eyelash.   So I am actively working trying to give some the power back to the "little guy" who is a victim of the system with live in.  It is my passion.  This is my social life so. 
lol though some fair warning I am honest and outspoken if you have not noticed.

Thank you again.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #8 on: December 15, 2013, 05:05:09 PM »
 :biglaugh

I can see that you are enthusiastic anyway and that is good!

The default launch command, like many other things is just an example to get people started.  Everyone has different needs, which is why the forum is so important.  Hopefully this thread will prove useful to anyone who wants to do something similar to you.  This approach may not be the best method for everyone though.

Maybe in January after the dust settles a bit we can set up a New Year hangout or two.  :D

RickyD333

  • Contributor
  • ***
  • Posts: 71
  • Karma: 2
    • View Profile
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #9 on: April 17, 2015, 01:06:37 PM »
Here is a group that will pretty much take care of everything for you.

1 - Create a subfolder in your VoxCommando folder and name it shortcuts
2 - Put all the shortcuts you want to in there.  Be sure to rename the shortcut if necessary to something will be easy to pronounce and will work as phrases.  If you have name where you actually want to say the letters, then you should put spaces between them.  For example, I have a voip program called 3CIX.  I like to say it as 4 words (3 see eye ex) so I should name the shortcut "3 C I X".  Or if you wanted to say "3 six" then you should name the shortcut that way.
3 - Copy and paste the xml below into your command tree, save and close your tree and wait for VC to build the new group.
4 - say "update shortcuts"

Your payload XML file will be created automatically and now you can say...

"launch X"

...where X is any shortcut name you have created.

Any time you add new shortcuts you just need to execute the "update shortcuts" command.


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="shortcuts" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1168" name="launch {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch</cmdType>
      <cmdString>{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>launch</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">shortcuts\shortcuts.xml</payloadFromXML>
  </command>
  <command id="1167" name="update shortcuts" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>File.GetFiles</cmdType>
      <cmdString>shortcuts\&amp;&amp;*.lnk</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <cmdString>shortcuts\shortcuts.xml</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <cmdString>Creating payload with {#M} shortcuts</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.MatchToEvent</cmdType>
      <cmdString>shortcut.add</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.RestartQuick</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>update shortcuts</phrase>
  </command>
  <command id="1173" name="add shortcut to payload" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.RegEx</cmdType>
      <cmdString>\\(.*?).lnk&amp;&amp;na&amp;&amp;{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.AddText</cmdType>
      <cmdString>{Match.1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <cmdString>shortcuts\shortcuts.xml&amp;&amp;{1}&amp;&amp;{Match.1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>shortcut.add</event>
  </command>
</commandGroup>

I found this topic/idea to be really awesome. I am trying to set this up myself but I think I'm missing something. Is there a Vox folder that I need to find/make and then put a sub-folder labeled "Shortcuts," or can I just put a folder on my Desktop and label it "Shortcuts"?

Right now I have a folder on my desktop labeled "Shortcuts" and whenever I give the command "update shortcuts" it returns with, "updating payload with 0 shortcuts." I'm not sure what's up here, but I'm guessing there's something simple that I am missing.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #10 on: April 17, 2015, 01:26:29 PM »
You just need to read the instructions.  They are in the text that you quoted.

The VoxCommando folder is the one where you installed VoxCommando.
« Last Edit: April 17, 2015, 01:32:20 PM by jitterjames »

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #11 on: July 10, 2015, 06:39:03 PM »
Here is a group that will pretty much take care of everything for you.

1 - Create a subfolder in your VoxCommando folder and name it shortcuts
2 - Put all the shortcuts you want to in there.  Be sure to rename the shortcut if necessary to something will be easy to pronounce and will work as phrases.  If you have name where you actually want to say the letters, then you should put spaces between them.  For example, I have a voip program called 3CIX.  I like to say it as 4 words (3 see eye ex) so I should name the shortcut "3 C I X".  Or if you wanted to say "3 six" then you should name the shortcut that way.
3 - Copy and paste the xml below into your command tree, save and close your tree and wait for VC to build the new group.
4 - say "update shortcuts"

Your payload XML file will be created automatically and now you can say...

"launch X"

...where X is any shortcut name you have created.

Any time you add new shortcuts you just need to execute the "update shortcuts" command.



Based on James excellent work above (same requirements apply- follow from above) and with new capabilities of watcher plugin (min 2.1.1.1)... this one can
treat .lnk(shortcut) .exe & .bat ....
triggering events and that will be .anything (except the three above) ex, launching netflix in RoboB ...

the moment a shortcut is added to, deleted from or renamed, the command will update automatically

the watcher should watch the shortcut folder mentioned above and called Programs Shortcuts or rename the event in update shortcuts command to match the name you give

I included an event command as an example and zip file contain some shortcuts .... after you add the command ... just add any shortcut or restart VC and the payload will be generated automatically

to create event shortcut, I create text file and rename it ... the file can stay empty ... in fact the contents are irrelevant

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.5.2-->
<commandGroup open="True" name="Programs Control" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="678" name="Launch / FocusPrograms" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VcAdvanced.Log</cmdType>
      <params>
        <param>--------------------  Start: Launch Program ------------------------</param>
        <param>{LastSpoken}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>ProcessRunning</ifType>
      <ifParams>{PF.1}&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>Window.Focus</cmdType>
          <params>
            <param>{PF.1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{PF.1} is running &amp; ready</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.StopMacro</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>\.(.*)$</param>
        <param />
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>lnk bat exe&amp;&amp;{Match.1}</ifParams>
      <then>
        <action>
          <cmdType>Launch.RawParam</cmdType>
          <params>
            <param>{1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>{1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>starting {PF.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VcAdvanced.Log</cmdType>
      <params>
        <param>--------------------  End: Launch Program ------------------------</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>launch, run, start, Switch to</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\Programs.xml</payloadFromXML>
  </command>
  <command id="1198" name="update shortcuts" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>File.GetFiles</cmdType>
      <params>
        <param>shortcuts\</param>
        <param>*.*</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\Programs.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>Creating payload with {#M} shortcuts</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <loop>
      <loopParams>
        <from>1</from>
        <to> {#M}</to>
      </loopParams>
      <loopActions>
        <action>
          <cmdType>Results.SetLastResult</cmdType>
          <params>
            <param>{Match.{j}}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>^(.*?\\)</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>(\..*)$</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PayloadXML.AddPair</cmdType>
          <params>
            <param>payloads\Programs.xml</param>
            <param>{Match.{j}}</param>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.AddText</cmdType>
          <params>
            <param>{Match.{j}} ::: {LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </loopActions>
    </loop>
    <action>
      <cmdType>Group.Rebuild</cmdType>
      <params>
        <param>Programs Control</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Watcher.Programs Shortcuts.*</event>
    <event>VC.Loaded</event>
  </command>
  <command id="265" name="Google Ok Google" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch.OpenURL</cmdType>
      <params>
        <param>http://google.com/search?sourceid=navclient&amp;q=</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Google Search.Start</event>
  </command>
</commandGroup>
« Last Edit: July 10, 2015, 06:51:34 PM by Haddood »
When Voice command gets tough, use hand gestures

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
Re: Launching shortcuts from the {Path.VC} Questions
« Reply #12 on: January 09, 2016, 01:04:40 AM »
Using a bunch of the above this is what I do for my desktop shortcuts.
My shortcuts are located in the default win 7 directory.

So this will update your desktop icons, create & fill the required payload & then open whichever shortcut you want.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<commandGroup open="True" name="Desktop" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="537" name="Desktop Update" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="In this example, I scan my mp3 directory's folders/subfolders. Be careful of which directory you choose here!">
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\desktop.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.Capture</cmdType>
      <params>
        <param>C:\Windows\System32\cmd.exe</param>
        <param>/C dir "C:\Users\Media\Desktop\"  /b /s</param>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RegExTool.Open</cmdType>
      <params>
        <param>True</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>(.+\\(.+)\.)</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.MatchToXML</cmdType>
      <params>
        <param>payloads\desktop.xml</param>
        <param />
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>update desktop, desktop update</phrase>
    <phrase optional="true">icons</phrase>
  </command>
  <command id="498" name="Open Desktop Shortcut (1)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Open Desktop</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\desktop.xml</payloadFromXML>
  </command>
</commandGroup>
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!