Author Topic: adding two ifs skips the first "then" clause.  (Read 1071 times)

0 Members and 1 Guest are viewing this topic.

sticker592

  • Jr. Member
  • **
  • Posts: 14
  • Karma: -2
    • View Profile
adding two ifs skips the first "then" clause.
« on: April 12, 2020, 04:12:18 AM »
I have autohotkeys set to focus on vox commando and potplayer. (I couldn't get the vc focus to work) For some reason after adding the voxcommando focus hotkey, the potplayer no longer send the keys when the command is activated. Why?

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.0-->
<command id="158" name="focus {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Window.Focus</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>{1}</ifType>
    <ifParams>==&amp;&amp;PotPlayer</ifParams>
    <then>
      <action>
        <cmdType>InputKeys.Send</cmdType>
        <params>
          <param>{SHIFT+CONTROL+ALT}({F})</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>{1}</ifType>
    <ifParams>==&amp;&amp;voxcommando</ifParams>
    <then>
      <action>
        <cmdType>InputKeys.Send</cmdType>
        <params>
          <param>{SHIFT+CONTROL+ALT}({V})</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <phrase>focus</phrase>
  <payloadList>PotPlayer, notepad,Kodi,firefox,voxcommando,mediamonkey,chrome</payloadList>
</command>

WHen I refactor it into a separate command, it works, but I'm posting here in case it's a bug. vc 2.2.4.0
Also, when I click the history check box, now I don't see the events history as I believe activated it before. Any ideas why?

Same thing happened with the following script. When it was alt right, the keys didn't send but UP did:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.0-->
<command id="649" name="volume up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <loop>
    <loopParams>
      <from>1</from>
      <to>{1}</to>
    </loopParams>
    <loopActions>
      <action>
        <cmdType>InputKeys.Send</cmdType>
        <params>
          <param>{ALT}({RIGHT})</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </loopActions>
  </loop>
  <phrase>volume up</phrase>
  <payloadRange>1,10</payloadRange>
</command>
---
I also am converting the payload searches to chrome from ie, but I can't pass in the command line arguments to chrome. I can launch.openfile chrome.exe but launch.openfile path/chrome.exe https://google.com/search?q={1} doesn't work. How can I pass in the parameter.
« Last Edit: April 12, 2020, 08:49:38 AM by jitterjames »

sticker592

  • Jr. Member
  • **
  • Posts: 14
  • Karma: -2
    • View Profile
Re: adding two ifs skips the first "then" clause.
« Reply #1 on: April 12, 2020, 08:21:53 AM »
To answer my second question, there were some example chrome commands I found so the path can only contain the exe and the site + search parameter has to be constructed as a payload. Not sure why I didn't try that already.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando

sticker592

  • Jr. Member
  • **
  • Posts: 14
  • Karma: -2
    • View Profile
Re: adding two ifs skips the first "then" clause.
« Reply #3 on: April 14, 2020, 04:58:05 AM »
It's now appearing on more and more commands. It will not send any keys after recognizing the command. What could be the cause of this? Is there a way to debug it? It will consistently not send the keys and then something will change and the next day the same command will send the keys.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: adding two ifs skips the first "then" clause.
« Reply #4 on: April 14, 2020, 07:59:55 AM »
https://voxcommando.com/mediawiki/index.php?title=Getting_support

Of course we can help if we are given proper information.

Also where did you get VoxCommando download and how did you license it?