Author Topic: Can VC knows which version is running ?  (Read 1850 times)

0 Members and 1 Guest are viewing this topic.

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Can VC knows which version is running ?
« on: September 02, 2014, 07:13:30 AM »
is there is a way that I can check which version is running ? SP or SAPI by using python, variables ...etc.
When Voice command gets tough, use hand gestures

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can VC knows which version is running ?
« Reply #1 on: September 02, 2014, 08:32:41 AM »
You can look at the main window to see this information but there is no action or variable built into vc that does this.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Can VC knows which version is running ?
« Reply #2 on: September 02, 2014, 01:57:32 PM »
Maybe I am wrong or did not understand the question.
VC sapi version run as voxcommando.exe and SP run as voxcommandoSP.exe in the taskmanager, so you can use a logic command to check which version is running like:

IF Process running  voxcommandoSP.exe THEN "any action" ELSE "any other action"

Let me know if this is for what you looking for.
***********  get excited and make things  **********

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Can VC knows which version is running ?
« Reply #3 on: September 02, 2014, 05:56:57 PM »
Maybe I am wrong or did not understand the question.
VC sapi version run as voxcommando.exe and SP run as voxcommandoSP.exe in the taskmanager, so you can use a logic command to check which version is running like:

IF Process running  voxcommandoSP.exe THEN "any action" ELSE "any other action"

Let me know if this is for what you looking for.

Kalle
you understood the question perfectly ... and you nailed the answer perfectly  :clap :clap :clap

however if James consider putting in a constant in the code that we can check like {engine} or similar would be cool

these days I am doing tests with both systems till I make my mind and I do not want to maintain 2 installations ... I prefer make the command that are related to SP or non with a little if statement
« Last Edit: September 02, 2014, 06:00:29 PM by Haddood »
When Voice command gets tough, use hand gestures

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Can VC knows which version is running ?
« Reply #4 on: September 02, 2014, 06:46:32 PM »
I'm not sure if there are really a users which use this value except you  ;)  so it is easier to store this value in a Maptable when VC is loaded as James would write the code for VC, maybe I'm wrong and it is also easy to write the code.  ::)
***********  get excited and make things  **********

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Can VC knows which version is running ?
« Reply #5 on: September 03, 2014, 04:18:25 PM »
map table won't do ... as both versions can read it .... it has be embedded in the exe file .... programmatically it should be about  one line declaring a global variable however not sure how is VC written ...

I know it is not that important ... that is why I did not put it in feature request ..
When Voice command gets tough, use hand gestures

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Can VC knows which version is running ?
« Reply #6 on: September 03, 2014, 04:41:39 PM »
Upps, I think you missunderstand me - As example: When you start VC-SP, you can trigger the logic above by VC.loaded event and store a value in the Maptable. ::hmm
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can VC knows which version is running ?
« Reply #7 on: September 03, 2014, 04:58:36 PM »
I think Kalle means that you can use the logic block with "if process running"  to set a map varriable.

This seems like a simple and elegant solution that will work perfectly (unless you are running muliple version of VC simultaneously) and I can't see why you would need anything more.

If it were me though, I would just use a variable.  There is no need for a map table in this case.

Something like this:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.0-->
<command id="1064" name="set version var" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType />
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>ProcessRunning</ifType>
    <ifParams>VoxCommandoSP&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>VcVersion</param>
          <param>SP</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>VcVersion</param>
          <param>Regular</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <event>VC.Loaded</event>
</command>

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Can VC knows which version is running ?
« Reply #8 on: September 03, 2014, 07:09:27 PM »
Kalle,

Yep I misunderstood you ... sorry for that ...

James thanks for the xml ...
When Voice command gets tough, use hand gestures

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Can VC knows which version is running ?
« Reply #9 on: September 03, 2014, 08:08:10 PM »
Quote
This seems like a simple and elegant solution that will work perfectly (unless you are running muliple version of VC simultaneously) and I can't see why you would need anything more.
This will work also with multiple instances of VC when you rename each voxcommando.exe like voxcommandoForMovies.exe, voxcommandoForWhatEver.exe, etc. .   :-*
***********  get excited and make things  **********