Author Topic: Requesting plugin support for Pinup Popper  (Read 5451 times)

0 Members and 1 Guest are viewing this topic.

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Requesting plugin support for Pinup Popper
« on: September 15, 2018, 05:12:05 PM »
Hello,

Was wondering if there was a possibility to have VC integrated with PinUp Popper, Popper is a new frontend for virtual pinball emulation.

Would need fairly basic commands like "Play Table Tron" or "Play a Stern Table" or "Play Random Table"   or "Find {Table Name}" and it go to the table before executing.


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #1 on: September 16, 2018, 02:56:55 AM »
Whatever is possible will depend on the capabilities of the software you are trying to control.

In this case your best bet will be to investigate their Web API to see what they offer and then you can probably control it using scrape actions.

http://www.nailbuster.com/wikipinup/doku.php?id=web_remote_control

https://voxcommando.com/mediawiki/index.php?title=Actions#Scrape

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #2 on: September 18, 2018, 02:04:52 PM »
Ok i've looked into your suggestion and have 21 commands working.

Question, for Media Monkey, you are using LoadbySQL.

Is there a way to use this function directed to a .db file? 

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #3 on: September 19, 2018, 08:12:09 AM »
MM.LoadbySQL is using functionality provided by the Media monkey API.

If pinuppopper does not provide similar functionality then it is not possible.

But I guess I don't understand what you are doing. It makes sense to me to load multiple songs into a play queue but why would you load multiple pinball games?

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #4 on: September 19, 2018, 10:30:43 AM »
This was more for a search function, by author, by year, by table type.

So if we say find Pinball Magic, we would scrape xxx.xxx.x.xx/function/pupfind/Pinball_Magic

We looked at the payload dictation and that would would work, but as suggested in the wiki and your video, the speech recognition isn't that great.  I wasn't getting the values i was speaking.

Probably look at popper doing the search and find work instead of vox, but have vox send the function commands like its doing for the other 20 or so we have working.

Have you tried this?   I used the same mic and it caught every word i was saying perfectly.

https://l.facebook.com/l.php?u=https%3A%2F%2Fcloud.google.com%2Fspeech-to-text%2F&h=AT12ThfAsDGibHMIHF1OpFjf375J2yuItlWKtFXjE2pwC1w7cOo5yGbyHg1wvxT-mmjyHkTWfzCHpeNYOCYYD2B4rJZOzz5-LD9izcCpuJ6uiP27RxYR06ZUBH6xJgpDQTjrjAhttps://l.facebook.com/l.php?u=https%3A%2F%2Fcloud.google.com%2Fspeech-to-text%2F&h=AT12ThfAsDGibHMIHF1OpFjf375J2yuItlWKtFXjE2pwC1w7cOo5yGbyHg1wvxT-mmjyHkTWfzCHpeNYOCYYD2B4rJZOzz5-LD9izcCpuJ6uiP27RxYR06ZUBH6xJgpDQTjrjA




jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #5 on: September 19, 2018, 01:04:09 PM »
I think we are getting off topic.

I think you are confusing different things with each other.  MM.LoadBySQL is not related to this.

For xxx.xxx.x.xx/function/pupfind/XXX

What you probably want to use is payloadXML instead of payload dictation.

https://voxcommando.com/mediawiki/index.php?title=Payloads

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #6 on: September 19, 2018, 02:36:48 PM »
i have about 5 payloadxml's currently, i understand those.

MM.LoadbySQL, more just asking if there was potential to query a direct db file for flexibility similar to what MM.LoadbySQL can do.  Select the file, and use sql commands to query that file to return results.  You confirmed this functionality was part of the MM api.

So now we are just going to have popper do the query work and vox send the command.

The issue is the payloadxml files need to updated based on the whats added to the .db file.

So a payloadxml takes care of the initial setup, but then requires manual changes unless we can query the db file or source file for any changes or updates.  Similar to your generate xml file command for the plugins.




« Last Edit: September 19, 2018, 02:39:30 PM by rablack97 »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #7 on: September 19, 2018, 06:50:39 PM »
So now we are just going to have popper do the query work and vox send the command.

OK.  I really don't know what that means but I guess it doesn't matter.

The issue is the payloadxml files need to updated based on the whats added to the .db file.

So a payloadxml takes care of the initial setup, but then requires manual changes unless we can query the db file or source file for any changes or updates.  Similar to your generate xml file command for the plugins.

Ideally popper should implement a command on their web API that returns a list of items which can be called up.  From that we could easily generate and update a payloadXML file.

If that's not possible then maybe send me a sample db file so I can look at what we are dealing with.

Bear in mind that I have exactly zero experience with what this program is or does.
« Last Edit: September 19, 2018, 07:35:25 PM by jitterjames »

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #8 on: September 19, 2018, 11:40:51 PM »
Yes sir I know it's a pain dealing with a blind request.

And this software is a PITA to setup.

From what i understand your having vox do all the query work, vox isn't sending a command to media monkey find jazz songs and media monkey is querying a .db file, i'm assuming its using the payload files.

All this software needs is a command and it will do the rest, however that is within Popper, its not doing jack for the payload files needed for vox to run cleanly.

That's what i meant by popper is doing the query work and vox just send the command to execute it.

Attached is the DB file


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #9 on: September 20, 2018, 12:19:07 PM »
OK.  That's an SQLite file which is good.

You can actually generate payloadXML files from that using the xSQL plugin in VC.

I was able to generate the following payloadXML files from it using that method.  Is this what you need?

You may find that you need to rename the games to make them more voice friendly...

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #10 on: September 22, 2018, 11:21:07 AM »
Sorry was out of town for my bday  :)

Yes this is exactly what i need!!!!!!!!!!!!

What commands did you use to do this, this is awesome.

My thoughts are possibly create a vox commando voice field for the database, and have the xml include that.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #11 on: September 22, 2018, 11:25:47 AM »
I can show you how to do this.  It's simplest if you are not already using the xSQL plugin for Kodi.  Are you using that?

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #12 on: September 22, 2018, 11:46:57 AM »
No, i stopped using this for music and movie play a long time ago, my family just couldnt get into the voice control, when they could do it on a IPAD. :bonk

Ok i just looked at the plugin, it looks fairly straight forward.

I just didnt know this was for other .db files, as the description says query XBMC database.

I need to select the database file and then just reference my colunm names, for the ID and then Phrase(column i want to use for the phrase).

select PlayListID,PlayName from PlayLists

I can create each playload xml the same way, is this correct?


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #13 on: September 22, 2018, 01:15:41 PM »
Yes, it's designed for an XBMC/Kodi database but they are just using an sqLite database file so there is no reason why you can't using it for other sqLite DBs.

See the attached image to know how to configure the plugin for PinUpPopper.

Note for the configuration:

-  You'll need to adjust the path for the custom database to wherever your PUPDabase.db file is located.  In my case I had the file in my VC folder but you'll want to use the original location so you can update from time to time.

- I set the Output Folder to a period.  This will save the payload XML files in the root VC folder.  You can put the XML files in a subfolder (or anywhere else) if you prefer.

- Make sure the "Type"column is set to "Custom" and use the following queries. (Delete all the other rows from Kodi first)
Code: [Select]
select GameID, GameName from Games
Code: [Select]
select PlaylistID, PlayName from PlayLists
- Make sure "Sub" is checked to enable subset matching in the payloadXML.
« Last Edit: September 22, 2018, 01:33:19 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #14 on: September 22, 2018, 01:19:01 PM »
and later to update your payload files you can use the action XSQL.GenerateAll in a command.

I've also added a new action to the xSQL plugin: XSQL.GenerateCustom

With that action you would not even need to modify your xSQL plugin settings but since you are not using Kodi the above method should be fine.

The new action will be included in the next release, whenever I get around to that.

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #15 on: September 22, 2018, 03:40:41 PM »
ok, so how does the loadbysql command work.  Does anything have to be modified on popper to use query searches like you use for media monkey.

Say for instance, i want to play a table by creator, so play a table from stern, and i want it to return a random table by creator stern ID that i can use in the scraper.

there is also a command that can return a json of the current table data, can that data be used by vox, for the "what table am i playing" or who created this table" function?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #16 on: September 22, 2018, 04:19:56 PM »
ok, so how does the loadbysql command work.  Does anything have to be modified on popper to use query searches like you use for media monkey.
You should look at the web API provided by PUP and if it doesn't provide the functionality you want you should ask them if they can add it.

there is also a command that can return a json of the current table data, can that data be used by vox, for the "what table am i playing" or who created this table" function?

there is also a command that can return a json of the current table data, can that data be used by vox, for the "what table am i playing" or who created this table" function?
Yes it's just a question of scraping and then looking for the information you want.  Probably with RegEx.
https://voxcommando.com/forum/index.php?topic=1699.msg14765

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #17 on: September 22, 2018, 08:22:42 PM »
ok, only think worth pulling in the json was the game name and the emulator name.

So is it hard for vox to access the .db file directly or does it have to be with an API.

Per the developer,  "the reason i did sqllite is SO anyone could read it" , is it alot of work to have vox do the same thing, that its doing the xml generator. Return results from a query of the database and use those results in vox command?


nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #18 on: September 23, 2018, 09:10:03 AM »
Hi rablack,

As far as I know, via the xSQL plugin solution that James previously described and VC's various other capabilities you should have everything you need to work with Pinup Popper's remote control options, such as they are.

For example, yesterday you asked how to create a command that would launch a random game for a particular, requested manufacturer.

We took a look at your db when you posted, and came up with the following option.

Generate a Custom payloadXML file via the xSQL plugin that associates a comma-separated list of game IDs with the appropriate game manufacturer:

Code: [Select]
SELECT GROUP_CONCAT(GameID), Manufact from Games where Manufact is not null GROUP by Manufact
This will result in a payloadXML where, for example, the Phrase "Stern" will be associated with Value "1,3,7,8,9,13,27,28,44,49,52,80,230,238,239,247"

Then, in your VC command you just need to parse that value to select one of the IDs randomly. VC gives a bunch of ways to do this. Here's one:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.1-->
<command id="50" name="Get random game by {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>(\d+)</param>
      <param />
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>randomID</param>
      <param>{Match.Rnd}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>Launching: {var.randomID}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>http://REPLACE WITH YOUR IP ADDRESS/function/launchgame/{var.randomID}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>load a game by</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\PUPcreators.xml</payloadFromXML>
</command>

Note: When I generated the Custom payloadXML, I named the file "PUPcreators.xml". By default, these payloads are stored in the XbmcPayloads folder, therefore that is what my command XML points to.

--
Basically, all VC command solutions will be about coming up with the right SQLite query to get the info you want from PUP, and then using a simple Scrape command to execute the desired PUP action. You may have to get a bit creative with your SQL queries.

Have fun.


« Last Edit: September 23, 2018, 09:13:13 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)

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #19 on: September 24, 2018, 12:04:07 AM »
ok this makes sense and will work fine.

One more question.

Is there a find function, where you would say "find tron" and it scrape an all games xml and display all game names with the word tron in the OSD.  That way way you could see the different variations of the table before trying to launch the actual table.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #20 on: September 24, 2018, 08:06:05 AM »
There is no such function.  You could of course write a command to do something similar, although you'd probably have to rely on payload dictation to tell it what to search for.

But this is exactly what subset matching and alternates are there for.

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #21 on: September 24, 2018, 11:23:16 AM »
any directional hints on how to do this, i'm not grasping the regex xml scrape nime5ter.  I can't get any results to return in the test.

I'm assuming you would have to create a payload xml with all of the variations?

In regards to the alternates, does the full vox commando window show up with the alternates of just a black Show.OSD screen?  I'm looking for just the Show.OSD screen, and is there a way to rotate the Show.OSD screen?

I just need a suggested command to use for the find functi, and i can run with it.  Just not sure which route to go.


nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #22 on: September 24, 2018, 12:22:52 PM »
Sorry it's not working for you. Not sure what is meant by "I can't get any results to return in the test".

You generated the payloadXML and issued a voice command successfully but it's not returning any game ID? It's not returning a valid game ID? The Scrape action is not properly launching a selected game? Something else?

Maybe you could run the command with logging enabled and post the log per standard user support requests, and also post the payloadXML you generated that you're using in the command.
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)

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #23 on: September 24, 2018, 01:38:53 PM »
Sorry it's not working for you. Not sure what is meant by "I can't get any results to return in the test".

You generated the payloadXML and issued a voice command successfully but it's not returning any game ID? It's not returning a valid game ID? The Scrape action is not properly launching a selected game? Something else?

Maybe you could run the command with logging enabled and post the log per standard user support requests, and also post the payloadXML you generated that you're using in the command.


No your command is working great.

I'm talking about a find function, which per James doesn't exist.

Was looking for some guidance, on how i could use the payload dictation and search through an xml and return all like results.

For example, create an all games xml, say find "batman" and have an OSD show all results LIKE Batman in a list.  Not really as an alternate command, just as a reference command.

If i have 3 batman tables the list will show all 3 titles, then i know what to say to launch it.

In your example you scraped the xml, and used Results.Regex, but when you open regex and try to view the results of the xml scrape nothing shows up, so I can't confirm if my scrape criteria is correct.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #24 on: September 24, 2018, 03:05:28 PM »
Ah, OK.

Personally I would recommend that you experiment with the built-in Alternates feature rather than creating a reference command. That's what it is designed for.

You can customize the Alternates OSD window a bit in VC Options, including choosing which monitor it's displayed on if you have multiple screens, and where on the screen it appears. There are quite a few VC videos that show it in action, including the JRiver demo video and others.

If you still want to create a custom command after fully exploring alternates, it could be done pretty easily by importing your games payloadXML into VC Maps and then in your command you would just execute a standard SQL query that looks for "batman" (i.e. the payload dictation term) in the appropriate column of your map table, but I question whether payload dictation will be reliable enough to handle weird video game words.
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)

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #25 on: September 24, 2018, 03:13:52 PM »
agreed on the dictation stability, i'm having to create a vox friendly list of pinball game names :)

I will look into alternates osd window as well.

TY for the tip on the VC Maps, just needed a bone.

Appreciate the teams time to look into the requests.


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #26 on: September 24, 2018, 03:33:35 PM »
Subset matching and alternates were created for exactly this type of thing.  The only possible issue is that there are 8 alternates at most.

By the way you need to clean up your game names to makes them more speech friendly.

In particular you need to replace all your underscores with spaces.  There are probably other issues as well.

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #27 on: September 24, 2018, 03:57:24 PM »
yep in the process of doing that now (cleaning up the game names), i'm check to see what impacts the GameName has on the software, clean that up and generate an xml off of that field, or might just ask developer to create a VoxName Field.

8 alternates is plenty.

With the advice given, i already have it doing some pretty cool stuff, i'm testing out different headsets now.

Once i get this find function down, i'll be on to scraping data from the Pinball database URL for info  :)

Is there a way to rotate the OSD?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Requesting plugin support for Pinup Popper
« Reply #28 on: September 24, 2018, 04:00:49 PM »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #29 on: September 25, 2018, 01:48:43 PM »
Hi,


maybe this command group will help you, but what James suggest - you have to clean the game names a bit and set a check mark in the VC option menue for show OSD alternates like in the attached picture.


(I tried it with the generated payload XML from James)
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.1-->
<commandGroup open="False" name="play pinball (read alternates aloud)" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="418" name="play pinball {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{PF.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>play pinball</phrase>
    <payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\PuP_Games.xml</payloadFromXML>
  </command>
  <command id="1164" name="alternates event" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{1}&amp;&amp;play pinball</ifParams>
      <then>
        <action>
          <cmdType>Results.SetLastResult</cmdType>
          <params>
            <param>There are {#P} alternates available. You can choose from option 1, to option {#P}.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetLastResult</cmdType>
          <params>
            <param>{LastResult}{CR}Option {i}: {{i}}.</param>
          </params>
          <cmdRepeat>{#P}</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>play.*?\{|}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <params>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <event>VC.Alternates.*</event>
  </command>
</commandGroup>


Kalle
***********  get excited and make things  **********

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #30 on: September 25, 2018, 02:02:49 PM »
Thank you Kalle,

I will try this today.

I also tried the mapping function and this works pretty well, might be crude but it works, instead of using dictation i used an all games xml for the phrase reference and the command looks for like phrases in the mapping. If there is an easier way to display the results, please advise, mainly for informational purposes.

Didn't know if there is a way to generate/update the mapping table based on the imported XML.  I was also have a VOX friendly speech field in the popper software to reference as well as a payload xml.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.0-->
<command id="291" name="newcommandname" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Map.Query</cmdType>
    <params>
      <param>select fromKey from VPTables where fromKey LIKE "%{1}%"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{#M}&amp;&amp;1</ifParams>
    <then>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{Match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>I found one table matching your search, {Match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType />
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{#M}&amp;&amp;2</ifParams>
    <then>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{Match.1}{CR}{Match.2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>I found two tables matching your search, {Match.1} and {Match.2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{#M}&amp;&amp;3</ifParams>
    <then>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{Match.1}{CR}{Match.2}{CR}{Match.3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>I found three tables matching your search,{Match.1},{Match.2},{Match.3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{#M}&amp;&amp;4</ifParams>
    <then>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{Match.1}{CR}{Match.2}{CR}{Match.3}{CR}{Match.4}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <phrase>Find</phrase>
  <payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">\\MKX-PC\Voxcommando\vpPayloads\VPtables.xml</payloadFromXML>
</command>

There's 3 screens on my cabinet, didnt dawn on me to just move the OSD to a non-ratated screen, so that problem is solved  :bonk

Making some really positive headway, this is making the cabinet, more interactive and easier to naviagte.


Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #31 on: September 25, 2018, 02:21:32 PM »
My command doesn’t need the dictation, it use the pupgames.xml. So you can say: „Play pinball Marvel“ and it will show you on OSD all alternates and read it aloud. Then you can say for example „option 3“ for the third alternate.
It doesn‘t execute anything at the moment - in other words - it is only a example how you can work with alternates.
I hope you like it  ;)
***********  get excited and make things  **********

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #32 on: September 25, 2018, 02:23:57 PM »
TY so much, looking forward to testing  :)

rablack97

  • $upporter
  • Sr. Member
  • *****
  • Posts: 100
  • Karma: 0
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #33 on: September 26, 2018, 02:26:03 PM »
ok i have the alternate function working, and also added the launch command to launch the option selected.  TY Kalle for your suggested solution.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Requesting plugin support for Pinup Popper
« Reply #34 on: September 26, 2018, 02:43:31 PM »
 8)
***********  get excited and make things  **********