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

Type out your parameters

Windows
6
10
2.9k
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.
  • R
    Russ
    last edited by Russ Jan 2, 2018, 12:52 AM Jan 2, 2018, 12:39 AM

    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 Jan 2, 2018, 12:40 AM Reply Quote 0
    • ?
      A Former User @Russ
      last edited by Jan 2, 2018, 12:40 AM

      @russ BIG HELP!

      1 Reply Last reply Reply Quote 0
      • E
        EL Dirtbag
        last edited by Jan 6, 2020, 4:48 PM

        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.

        R 1 Reply Last reply Jan 7, 2020, 3:44 AM Reply Quote 0
        • R
          Russ @EL Dirtbag
          last edited by Jan 7, 2020, 3:44 AM

          @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
          • C
            Chabetico
            last edited by May 8, 2021, 3:52 AM

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

            R 1 Reply Last reply May 8, 2021, 4:59 PM Reply Quote 0
            • R
              Russ @Chabetico
              last edited by Russ May 8, 2021, 5:00 PM May 8, 2021, 4:59 PM

              @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 Sep 12, 2022, 2:04 PM

                @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 Sep 12, 2022, 3:48 PM Reply Quote 0
                • A
                  aaaaa12345 @it_ibsolution.de
                  last edited by aaaaa12345 Sep 12, 2022, 3:49 PM Sep 12, 2022, 3:48 PM

                  @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 Sep 13, 2022, 5:15 AM Reply Quote 0
                  • I
                    it_ibsolution.de @aaaaa12345
                    last edited by Sep 13, 2022, 5:15 AM

                    @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 Sep 16, 2022, 10:43 AM Reply Quote 0
                    • A
                      aaaaa12345 @it_ibsolution.de
                      last edited by aaaaa12345 Sep 16, 2022, 10:50 AM Sep 16, 2022, 10:43 AM

                      @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