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

    Type out your parameters

    Windows
    6
    10
    2.4k
    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.
    • RussR
      Russ
      last edited by Russ

      I can say:

      • Alexa, ask TRIGGERcmd to run Type This with parameter I am the coolest

      And my computer will type "I am the coolest" wherever my cursor happens to be.

      Create c:\tools\typeit.vbs with these contents:

      Dim Wsh
      Set Wsh = Wscript.CreateObject("Wscript.Shell")
      
      Set args = Wscript.Arguments
      
      For Each arg In args
        Wsh.SendKeys arg
        Wsh.SendKeys " "
      Next
      

      Then create a command in TRIGGERcmd like this with parameters turned on:

      wscript c:\tools\typeit.vbs
      

      TRIGGERcmd runs your commands super fast, so if you're testing this on the computer where the agent is running and using the Parameters button on the website, you can add a 5 second pause at the beginning of the script with this command. That should give you enough time to click another window before it types your parameters in that window.

      WScript.sleep 5000
      

      Russell VanderMey

      ? I 2 Replies Last reply Reply Quote 0
      • ?
        A Former User @Russ
        last edited by

        @russ BIG HELP!

        1 Reply Last reply Reply Quote 0
        • E
          EL Dirtbag
          last edited by

          Hi Russ,

          I'm trying to improve the dictation that I've been using via this parameter. Things that I run into often is my Google Home will only listen to me for a sentence or two and I struggle with punctuation.

          How can I code for Google to listen longer and to enter in punctuation? Commas work! But not periods, hyphens, colons, etc. I've played with sendkeys to navigate software in the past with success. Another feature I'm trying to accomplish is a new paragraph.

          Thanks in advance.

          RussR 1 Reply Last reply Reply Quote 0
          • RussR
            Russ @EL Dirtbag
            last edited by

            @EL-Dirtbag, I'm actually surprised you can use this to type more than a short sentence. I think Google Assistant has a timeout of only a few seconds. That said, you could have your script type two enter keys at the end (or beginning), so each time you invoke the script via TRIGGERcmd, it would create a new paragraph.

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            • ChabeticoC
              Chabetico
              last edited by

              Any solution for him to select the YouTube search bar automatically and do the search right after it?

              RussR 1 Reply Last reply Reply Quote 0
              • RussR
                Russ @Chabetico
                last edited by Russ

                @Chabetico, you can actually search Youtube with a command like this:

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

                Do you want to be able to search youtube for the parameter you send to the command via TRIGGERcmd? If so, you could make a d:\tools\SearchYoutube.bat with these contents:

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

                Then make your command like this, and remember to enable parameters.

                ffc7e1d4-e243-423e-84a7-33f003c11130-image.png

                Russell VanderMey

                1 Reply Last reply Reply Quote 0
                • I
                  it_ibsolution.de @Russ
                  last edited by

                  @Russ
                  Hi, how can I pass arguments to triggercmd, that are actually a string and get interpreted as multiple commands?

                  I have a script, that triggers a backup script and the parameter is the server name.
                  For example the server name is "sapp30".
                  So I want to ask "Alexa, make a backup of sapp30"

                  What triggercmd is receiving from alexa is
                  "Trigger sent from Alexa params = sap p 30"

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    aaaaa12345 @it_ibsolution.de
                    last edited by aaaaa12345

                    @it_ibsolution.de
                    Wenn du die Frage im Autohotkey-Forum noch mal stellst, sollte das recht einfach zu lösen sein.

                    voice: "Alexa, make a backup of S A P thirty"
                    command: "Autohotkey.exe myScript.ahk sap p 30"

                    I 1 Reply Last reply Reply Quote 0
                    • I
                      it_ibsolution.de @aaaaa12345
                      last edited by

                      @aaaaa12345
                      Autohotkey sagt mir leider nichts.
                      Alle über Triggercmd aufgerufenen Scripte sind Powershell.
                      Normalerweise könnte ich die Parameter im script einfach wieder zusammensetzen.
                      Je nach Name des Servers werden aber eine unterschiedliche Anzahl von Parametern "erkannt".

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        aaaaa12345 @it_ibsolution.de
                        last edited by aaaaa12345

                        @it_ibsolution.de
                        Du kannst dein script ja so auslegen, das es eine statische Anzahl an Parametern gibt, wobei diese, bei "Nichtverwendung" gegebenenfalls mit einem Platzhalter/dummy bestückt werden.
                        Bei der anschließenden Auswertung im Script wären diese dann als "ungenutzt" markierten Parameter schlicht zu ignorieren. Oder ...
                        du flagst jeden Parameter explizit wie (AFAIK) unter Linux üblich mit einem Bezeichner:
                        "--drive C:" "--command defrag" "-time 20220916180000"
                        ...und wertest dementsprechend aus.

                        AutoHotkey ist eine (open source) Scriptsprache, welche über die von Powershell bereitgestellten systemnahen Funktionen auch events auf application/desktop level steuern kann. Mehr dazu gibt es in den einschlägigen Fachzeitschriften wie der c´t, oder unter autohotkey.com
                        Natürlich lässt sich auch PowerShell damit kombinieren.

                        HTH

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post