Author Topic: {ENTER} not working  (Read 2954 times)

0 Members and 1 Guest are viewing this topic.

Beaupa

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 0
    • View Profile
{ENTER} not working
« on: February 17, 2014, 10:12:39 AM »
Hey guys,

I have been trying for days to get my search&play function to work in Foobar2000. I was able to get the search function to work, but I cannot get the song to play. I have tried [sendkeys] [inputkeys] [dxinput plugin] [carriage return {CR}] [tild ~]

Nothing seems to work except a hard [enter] by pressing the key. I have made sure that the window is focused, and I also shortened the macro and pressed enter and that works. So I am guessing its just the format.

Im not advanced enough yet to get into the [get xml] xml stuff. Think I need to do some reading for that, but a simple search and play will work for now.

edit: whoops, forgot the code...lol

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="False" name="3_query music" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="980" name="search {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="" description="">
    <action>
      <cmdType>Window.Focus</cmdType>
      <cmdString>Foobar2000</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <cmdString>{LCONTROL}({L})</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>SendKeys</cmdType>
      <cmdString>{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <cmdString>{ENTER}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>play</phrase>
    <payloadDictation>payloadDictation: Regular</payloadDictation>
  </command>
</commandGroup>
thanks
-mike
« Last Edit: February 17, 2014, 03:14:03 PM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: {ENTER} not working
« Reply #1 on: February 17, 2014, 10:30:09 AM »
I don't know that anyone here uses foobar2000. Maybe if you post your VC log after trying this command a few times we can see what's actually happening.

What are you using the free dictation for? Is that how you're trying to give it song names??

You might at least want to replace that with a short, static payload list of a few specific song titles (or whatever it is you're trying to get it to play) for testing purposes.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Beaupa

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 0
    • View Profile
Re: {ENTER} not working
« Reply #2 on: February 17, 2014, 10:40:49 AM »
Hey nime5ter, I am using tellvox at the moment for payloads, so they are accurate. Here is the log.

thx
-mike

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: {ENTER} not working
« Reply #3 on: February 17, 2014, 10:55:31 AM »
I tried your command and it works.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: {ENTER} not working
« Reply #4 on: February 17, 2014, 10:59:59 AM »
I'm not sure what Ctrl-L is supposed to be for, but this command does a successful search and play for me on foobar 2000 v 1.3.1

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="980" name="search {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="" description="">
  <action>
    <cmdType>Window.Focus</cmdType>
    <cmdString>Foobar2000</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.Send</cmdType>
    <cmdString>{LCONTROL}({F})</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.TextEntry</cmdType>
    <cmdString>{1}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <cmdString>100</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.Send</cmdType>
    <cmdString>{ENTER}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.Send</cmdType>
    <cmdString>{ESCAPE}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>play</phrase>
  <payloadDictation>payloadDictation: Regular</payloadDictation>
</command>

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: {ENTER} not working
« Reply #5 on: February 17, 2014, 11:03:44 AM »
So far I don't know. I've downloaded foobar2000 and your original command works fine for me, though it's not clear why you're using ctrl-L, as James has said as well (I didn't see his post until now.)

I don't see any problems with that in your log.

I assume you have a song that is called "land" loaded in foobar2000 ... ?

What versions of everything are you using, and what's your OS?

(Or just try James's xml. Maybe it will work better for you. Could be that on your system a pause before pressing the enter key will help.)
« Last Edit: February 17, 2014, 11:12:57 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Beaupa

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 0
    • View Profile
Re: {ENTER} not working
« Reply #6 on: February 17, 2014, 11:22:50 AM »
hmmm, very strange. I have v 1.3.1. Ctrl+L is a library search. My system is Win 7 Ultimate.

the command wasnt working over the weekend. I will retry James xml

very very very strange. I know its on my end and not VC.

the actions work when I physically do them on the keyboard, but when I execute in VC, I get the foobar2000 search window and the payload in the field, but no {ENTER} to start the song.

James> your code seemed to do the same but the library window closed because of the {ESC}

I am running on an Acer Aspire One netbook. Keyboard detects as standard PS/2

Did I mention strange...

I may just migrate to XBMC, I chose foobar because of the small footprint

-mike
« Last Edit: February 17, 2014, 11:49:10 AM by Beaupa »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: {ENTER} not working
« Reply #7 on: February 17, 2014, 12:07:45 PM »
For music I use the free version of MediaMonkey. The VC config for MM works great.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: {ENTER} not working
« Reply #8 on: February 17, 2014, 12:12:37 PM »
IMO, for just music you can't find better than MediaMonkey.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: {ENTER} not working
« Reply #9 on: February 17, 2014, 12:25:16 PM »
the actions work when I physically do them on the keyboard, but when I execute in VC, I get the foobar2000 search window and the payload in the field, but no {ENTER} to start the song.

James> your code seemed to do the same but the library window closed because of the {ESC}

I would have guessed that this was because of some security settings, depending on what OS you had and your account or UAC settings, but then I think it would block everything, not just the enter key.  It certainly is weird, but we can't recreate it so I don't know what to suggest, except that maybe you have a remapped key somewhere.  Maybe a fresh install of foobar would solve it.  We were testing using the portable version...  Don't know if that matters or not.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: {ENTER} not working
« Reply #10 on: February 17, 2014, 12:38:09 PM »
I am running on an Acer Aspire One netbook. Keyboard detects as standard PS/2

I just tested this on my A1 netbook w/ W7 Ultimate. For James's command to work, I had to add a pause of a good half a second after the Ctrl-F for it to have time to open the search window and enter the text fully.

But when I was simply entering the song name and {ENTER} within the main foobar window it worked fine. So, if you want to search a particular library, maybe you'd need to add longer VC.Pause actions to give the system more time.

Your original command also worked fine for me as is. Keep in mind that I do not have a Ctrl-L shortcut, so again it was just entering the song name and {Enter} in the main playlist.

Otherwise, who knows. Works fine for us on three different systems. :)
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Beaupa

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 0
    • View Profile
Re: {ENTER} not working
« Reply #11 on: February 17, 2014, 02:55:00 PM »
I just tested this on my A1 netbook w/ W7 Ultimate. For James's command to work, I had to add a pause of a good half a second after the Ctrl-F for it to have time to open the search window and enter the text fully.

But when I was simply entering the song name and {ENTER} within the main foobar window it worked fine. So, if you want to search a particular library, maybe you'd need to add longer VC.Pause actions to give the system more time.

Your original command also worked fine for me as is. Keep in mind that I do not have a Ctrl-L shortcut, so again it was just entering the song name and {Enter} in the main playlist.

Otherwise, who knows. Works fine for us on three different systems. :)

Hey guys, WOW. GREAT support here... thanks for that

I am going to check out Media Monkey for sure. I took a peak at the VC commands for that and the support is there.

Just for fun I did fix my issue kinda. This works:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="False" name="3_query music" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="993" name="play {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="" description="">
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <cmdString>searching for {1} sir</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Window.Focus</cmdType>
      <cmdString>Foobar2000</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <cmdString>{LCONTROL}({L})</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.TextEntry</cmdType>
      <cmdString>{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <cmdString>1000</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <cmdString>{ENTER}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Window.Focus</cmdType>
      <cmdString>Media Library Search</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <cmdString>{LCONTROL}({A})</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <cmdString>{BACKSPACE}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <cmdString>{ESC}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Window.Minimize</cmdType>
      <cmdString>Foobar2000</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>play</phrase>
    <payloadDictation>payloadDictation: Regular</payloadDictation>
  </command>
</commandGroup>

The new challenge I have is triggering it properly. AKA its working in the command builder, but not in TellVox. Anyway, you dont have to spend time on this. I think I am going to MM.  ;)
« Last Edit: February 17, 2014, 03:09:47 PM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: {ENTER} not working
« Reply #12 on: February 17, 2014, 03:12:54 PM »
okeydoke.

In the future, please always post your xml in a code block rather than in a quote block. The # symbol is used for code blocks.

Command xml can be pretty long. Code blocks have internal scrollbars, which save vertical space and make threads more readable.

We have been editing your posts to fix this.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)