• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Never used parameters before...

Windows
4
25
3.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X
    Xander
    last edited by Jul 7, 2020, 2:08 AM

    So....

    "trigger": "search",
    "command": "path\search.bat",
    "ground": "foreground",
    "voice": "search",
    "voiceReply": "Sure!",
    "allowParams": "true"

    Search.bat:

    start https://www.google.com/search?q=%1
    

    That should work?

    R 1 Reply Last reply Jul 7, 2020, 3:41 PM Reply Quote 0
    • R
      Russ @Xander
      last edited by Jul 7, 2020, 3:41 PM

      @Xander, if "path" is meant to be a placeholder for the path where your search.bat resides, like c:\scripts\, then yes, that should work.

      "trigger": "search",
      "command": "c:\scripts\search.bat",
      "ground": "foreground",
      "voice": "search",
      "voiceReply": "Sure!",
      "allowParams": "true"

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • X
        Xander
        last edited by Jul 8, 2020, 3:56 PM

        Well....

        "Alexa, ask TriggerCMD to run Search on my computer with parameters martini recipes" got me a search on 'recipes'
        "Alexa, ask TriggerCMD to run Search on my computer with parameters cotton candy" got me a search on 'candy'
        "Alexa, ask TriggerCMD to run Search on my computer with parameters camping gear reviews" got me a search on 'reviews'

        Any idea why it's using only the last word of parameters?

        And wasn't there a way to set one PC as a default so I wouldn't need to specify it? It defaults on other commands (so I must have set something up a while back) but, for this one, it insists that I specify which PC. As is, it's fairly clunky in the verbiage department for a 'quick' reminder.

        R 1 Reply Last reply Jul 8, 2020, 9:28 PM Reply Quote 0
        • R
          Russ @Xander
          last edited by Jul 8, 2020, 9:28 PM

          @Xander, you can set your default computer in your profile. Click your name in the in the upper-right to find your profile.
          You don't have to say the "... on my computer ..." part when it's your default computer.

          I recommend testing with a batch file that outputs all of your parameters to a log file like this:

          echo %1 %2 %3 %4 %5 %6 %7 >> c:\scripts\params.log
          

          That way you'll know if Alexa is passing all of your parameters to your script.

          I said, "Alexa, ask TRIGGERcmd to run Logger with parameter cotton candy" and I got this entry:

          cotton candy   
          

          You can also test your script by running it with the "Parameters" button on the website.

          Russell VanderMey

          R 1 Reply Last reply Aug 20, 2020, 6:39 AM Reply Quote 0
          • R
            Royher Figuera
            last edited by Aug 19, 2020, 9:12 PM

            @Russ I made the changes to search videos on youtube following your instructions but my params (%1) can´t connect with my browser. I'm missing something?

            "C:\Users\xxx.TRIGGERcmdData\Youtube.bat

            .BAT
            start https://www.youtube.com/results?search_query=%1

            {
            "trigger": "Youtube2",
            "command": ""C:\Users\xxx\.TRIGGERcmdData\Youtube.bat",
            "ground": "foreground",
            "voice": "busqueda",
            "voiceReply": "Abriendo Youtube PC",
            "allowParams": "true"
            }

            R 1 Reply Last reply Aug 20, 2020, 1:11 AM Reply Quote 0
            • R
              Russ @Royher Figuera
              last edited by Aug 20, 2020, 1:11 AM

              @Royher-Figuera said in Never used parameters before...:

              start https://www.youtube.com/results?search_query=%1

              @Royher-Figuera, I created a .bat file with only this line in it, and it worked for me.

              start https://www.youtube.com/results?search_query=%1
              

              Does it even work for you using the Parameters button on the website?

              63267448-369f-4ef0-b87e-dfd3aad7c774-image.png

              1b72021f-b3e4-441e-a562-7ee87ced0fac-image.png

              Russell VanderMey

              R 1 Reply Last reply Aug 20, 2020, 3:09 AM Reply Quote 0
              • R
                Royher Figuera @Russ
                last edited by Aug 20, 2020, 3:09 AM

                @Russ I try 2 times, with params nothing happens and without params open youtube...

                ac399c79-86fb-4aed-a045-60771ddc47d0-image.png

                R 1 Reply Last reply Aug 20, 2020, 5:28 AM Reply Quote 0
                • R
                  Royher Figuera @Royher Figuera
                  last edited by Aug 20, 2020, 5:28 AM

                  @Royher-Figuera said in Never used parameters before...:

                  @Russ I try 2 times, with params nothing happens and without params open youtube...

                  ac399c79-86fb-4aed-a045-60771ddc47d0-image.png

                  @Russ I was find my error... In GUI command editor I forgot a final quotation marks. Sorry and thank You...

                  R 1 Reply Last reply Aug 20, 2020, 9:50 PM Reply Quote 0
                  • R
                    Royher Figuera @Russ
                    last edited by Aug 20, 2020, 6:39 AM

                    @Russ said in Never used parameters before...:

                    @Xander, you can set your default computer in your profile. Click your name in the in the upper-right to find your profile.
                    You don't have to say the "... on my computer ..." part when it's your default computer.

                    @Russ I set my default pc but when I try to run a trigger with parameters google home insists in say which PC run the trigger

                    d2ca323b-61dd-45d3-9964-f13a04ba66be-image.png

                    1 Reply Last reply Reply Quote 0
                    • R
                      Russ @Royher Figuera
                      last edited by Russ Aug 20, 2020, 9:55 PM Aug 20, 2020, 9:50 PM

                      @Royher-Figuera, I'm glad you figured out the Youtube parameters thing.

                      Please tell me the exact words you're using.

                      If you're saying what's on the page when you click this button (on your default computer line):
                      3b1dbfa9-a3c2-47b8-a754-bd77f962f09f-image.png

                      ... then this button:
                      a3f6cde7-06a5-4977-b97d-b473364dc43c-image.png

                      ... then I might have a problem. I'm sure I can fix it though, so I'd appreciate your help troubleshooting it.

                      What does Google Assistant say back to you exactly?

                      Russell VanderMey

                      1 Reply Last reply Reply Quote 0
                      • R
                        Royher Figuera
                        last edited by Aug 21, 2020, 1:32 AM

                        @Russ I follow your instructions and this is the result:

                        My native language is spanish

                        394cd108-dbe0-4cdd-a31f-ee9e0f2b4b2f-image.png

                        Google Home mini says:
                        no se ha encontrado un ordenador con ese nombre busqueda (a computer with that name was not found search)

                        Google home listen my trigger (busqueda) like my computer name

                        R 1 Reply Last reply Aug 21, 2020, 11:39 AM Reply Quote 0
                        • R
                          Russ @Royher Figuera
                          last edited by Russ Aug 22, 2020, 2:59 PM Aug 21, 2020, 11:39 AM

                          @Royher-Figuera, thank you! I think I can fix this. I'll try this weekend and ask you to test it.

                          EDIT:
                          @Royher-Figuera, I think I see the problem.
                          When you said, "ejecuta en PC búsqueda con parámetros reggaetón"
                          Google sent these parameters:
                          trigger = ejecuta
                          command = búsqueda
                          params = reggaetón

                          If you had said, "ejecuta búsqueda con parámetros reggaetón" I think it would have worked.
                          When I tried that, Google sent these parameters:
                          trigger = búsqueda
                          params = reggaetón

                          "ejecuta en PC búsqueda" is not one of the valid patterns.

                          Russell VanderMey

                          R 1 Reply Last reply Aug 29, 2020, 8:26 PM Reply Quote 0
                          • R
                            Royher Figuera @Russ
                            last edited by Royher Figuera Aug 29, 2020, 8:51 PM Aug 29, 2020, 8:26 PM

                            @Russ said in Never used parameters before...:

                            @Royher-Figuera, thank you! I think I can fix this. I'll try this weekend and ask you to test it.

                            EDIT:
                            @Royher-Figuera, I think I see the problem.
                            When you said, "ejecuta en PC búsqueda con parámetros reggaetón"
                            Google sent these parameters:
                            trigger = ejecuta
                            command = búsqueda
                            params = reggaetón

                            If you had said, "ejecuta búsqueda con parámetros reggaetón" I think it would have worked.
                            When I tried that, Google sent these parameters:
                            trigger = búsqueda
                            params = reggaetón

                            "ejecuta en PC búsqueda" is not one of the valid patterns.

                            Hi @Russ still having issues... I try both cases, but google home need a name pc to execute the trigger. Google Home´s listen "Busqueda" like my pc name, when I use your recommendation. It´s saying " no se ha encontrado un ordenador con ese nombre búsqueda" (a computer with that name was not found Búsqueda).

                            If I have my default PC (PC) Why It´s still taken my trigger like a PCname

                            Edit:
                            I try first "Ok Google, hablar con ejecuta comando" and then "ejecuta Búsqueda en PC con parametro X" ... and the search in youtube was sucedeed.

                            When I use "Ok Google, hablar a Ejecuta Comando ejecutar Búsqueda con parámetro X" ... is failing*

                            This line error nocomputercalledprefix = "No se ha encontrado un ordenador con ese nombre."

                            I will be doing tests and will comment...

                            R 1 Reply Last reply Aug 29, 2020, 9:25 PM Reply Quote 0
                            • R
                              Russ @Royher Figuera
                              last edited by Russ Aug 30, 2020, 2:24 AM Aug 29, 2020, 9:25 PM

                              @Royher-Figuera, what happens when you do this?
                              "Ok Google, preguntarle a Ejecuta Comando ejecutar búsqueda con el parámetro X."

                              I found your phrases in the history Google gives me to help train it.
                              For this one: ejecutar búsqueda con parámetro USB
                              It identified búsqueda as a computer instead of the trigger. I changed that in the training. I did the same for a few of your other phrases too. I hope that helps. The change will take effect after Google approves it in a couple days (hopefully). I submitted for approval just now.

                              I also found that google sent trigger = undefined. I can work around that and change the logic so if computer is something but trigger is undefined, it will use the computer value as the trigger. I'm working on that now.
                              EDIT: I didn't finish today, but I'll try to finish tomorrow. It's a simple change but I'm running into a deployment problem now.

                              Russell VanderMey

                              R 1 Reply Last reply Aug 30, 2020, 2:46 AM Reply Quote 0
                              • R
                                Royher Figuera @Russ
                                last edited by Aug 30, 2020, 2:46 AM

                                @Russ When I say this:

                                "Ok Google, preguntarle a Ejecuta Comando ejecutar búsqueda con el parámetro X."

                                Google Home says

                                "Lo siento, no puedo ayudarte con eso"

                                Thanks again, and let me know When I can try again

                                R 1 Reply Last reply Aug 31, 2020, 12:07 PM Reply Quote 0
                                • R
                                  Russ @Royher Figuera
                                  last edited by Aug 31, 2020, 12:07 PM

                                  @Royher-Figuera, ok, please try it now. I made the change.

                                  Russell VanderMey

                                  R 1 Reply Last reply Sep 3, 2020, 8:45 PM Reply Quote 0
                                  • R
                                    Royher Figuera @Russ
                                    last edited by Sep 3, 2020, 8:45 PM

                                    @Russ said in Never used parameters before...:

                                    @Royher-Figuera, ok, please try it now. I made the change.

                                    @Russ is working now...

                                    But, one question. We only can say "Ok Google, preguntarle a Ejecuta Comando ejecutar búsqueda con el parámetro X" ?, the long version?

                                    It´s not posible only say "Ok google, ejecutar* búsqueda con parámetro X" ?

                                    R 1 Reply Last reply Sep 3, 2020, 9:01 PM Reply Quote 0
                                    • R
                                      Russ @Royher Figuera
                                      last edited by Russ Sep 3, 2020, 9:01 PM Sep 3, 2020, 9:01 PM

                                      @Royher-Figuera, good question. No, that's not possible. The preguntarle a Ejecuta Comando part tells Google Assistant to use TRIGGERcmd, and the part after that tells TRIGGERcmd what to do. I know it's a lot to say. That's why I like the Smart Home version better, but I know that only allows on or off as parameters.

                                      Russell VanderMey

                                      R 1 Reply Last reply Sep 3, 2020, 11:59 PM Reply Quote 0
                                      • R
                                        Royher Figuera @Russ
                                        last edited by Sep 3, 2020, 11:59 PM

                                        @Russ said in Never used parameters before...:

                                        @Royher-Figuera, good question. No, that's not possible. The preguntarle a Ejecuta Comando part tells Google Assistant to use TRIGGERcmd, and the part after that tells TRIGGERcmd what to do. I know it's a lot to say. That's why I like the Smart Home version better, but I know that only allows on or off as parameters.

                                        Wow, 😞 It´s a lot to say...

                                        But is a good reason to diggin about...

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          Royher Figuera
                                          last edited by Oct 21, 2020, 1:48 PM

                                          Hi @Russ I'm back again...

                                          Again when I make a searching, the results are the variables of my .bat file.

                                          For example

                                          https://www.farmatodo.com.ve/buscar?producto=$10$20$30$4&departamento=Todos&filtros=

                                          https://www.youtube.com/results?search_query=$10$20$30$4

                                          https://www.cinecalidad.is/?s=$10$20$30$4

                                          Before was go Well

                                          Can You Check, please?

                                          R 1 Reply Last reply Oct 21, 2020, 11:37 PM Reply Quote 0
                                          • First post
                                            Last post