VoxCommando
Help and Support (Using VoxCommando) => VoxCommando Basics and Core Features => Topic started by: Haddood 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.
-
You can look at the main window to see this information but there is no action or variable built into vc that does this.
-
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.
-
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
-
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. ::)
-
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 ..
-
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
-
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:
<?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&&</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>
-
Kalle,
Yep I misunderstood you ... sorry for that ...
James thanks for the xml ...
-
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. . :-*