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

    Commands that use Nircmd.exe (toggle mute, say stuff, etc.)

    Scheduled Pinned Locked Moved Windows
    14 Posts 4 Posters 13.3k Views 3 Watching
    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.
    • C Offline
      Christian Robinson @Russ
      last edited by Christian Robinson

      Since I already use AutoHotkey I used someone's example one-off AutoHotkey script to accomplish the Mute/Unmute, plus Play/Pause, Volume Up/Down, and Skip Forward/Back. I can provide the script and commands if anybody's interested. It can be used to simulate virtually any keyboard key, or even key sequences.

      1 Reply Last reply Reply Quote 1
      • N Offline
        Nate Hales
        last edited by

        Yes post them please.

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          Christian Robinson @Nate Hales
          last edited by Christian Robinson

          @Nate-Hales

          SimKeys.ahk

          ; By SKAN,  http://goo.gl/JfMNpN,  CD:23/Aug/2014 | MD:24/Aug/2014
          
          #Warn
          #SingleInstance, Force
          
          Args( CmdLine := "", Skip := 0 ) {
            Local pArgs := 0, nArgs := 0, A := []
            
            pArgs := DllCall( "Shell32\CommandLineToArgvW", "WStr",CmdLine, "PtrP",nArgs, "Ptr" ) 
          
            Loop % ( nArgs ) 
               If ( A_Index > Skip ) 
                 A[ A_Index - Skip ] := StrGet( NumGet( ( A_Index - 1 ) * A_PtrSize + pArgs ), "UTF-16" )  
          
            Return A, A[0] := nArgs - Skip, DllCall( "LocalFree", "Ptr", pArgs)  
          }
          
          CmdLine := DllCall( "GetCommandLine", "Str" )
          Skip    := ( A_IsCompiled ? 1 : 2 )
          argv    := Args( CmdLine, Skip )
          
          If ( argv[0] == 1 )
            Send % argv[1]
          Else
            Msgbox, , Error, Must provide exactly one argument, 10
          
          ;Msgbox % "Count = " argv[0] "`n1=" argv[1] "`n2=" argv[2] "`n3=" argv[3] "`n4=" argv[4] "`n5=" argv[5]
          

          SimKeys.vbs

          Dim WshShell
          Set WshShell = WScript.CreateObject("WScript.Shell")
          WshShell.SendKeys WScript.Arguments(0)
          

          Excerpt from commands.json

          {"trigger":"Play", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Play_Pause}", "ground":"foreground", "voice":"play"}, 
          {"trigger":"Pause", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Play_Pause}", "ground":"foreground", "voice":"pause"}, 
          {"trigger":"Stop", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Stop}", "ground":"foreground", "voice":"stop"}, 
          {"trigger":"Previous", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Prev}", "ground":"foreground", "voice":"previous"}, 
          {"trigger":"Next", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Next}", "ground":"foreground", "voice":"next"}, 
          {"trigger":"Volume Up", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Volume_Up}", "ground":"foreground", "voice":"volume up"}, 
          {"trigger":"Volume Down", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Volume_Down}", "ground":"foreground", "voice":"volume down"}, 
          {"trigger":"Mute/Unmute", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Volume_Mute}", "ground":"foreground", "voice":"mute"}, 
          

          Replace "YOUR DIRECTORY" with the proper path to SimKeys.ahk and SimKeys.vbs (both need to be in the same location).

          Edit: It appears SimKeys.vbs is not necessary. I don't remember why I have it--possibly because I was trying out an alternate method and forgot to move/remove it. I'm leaving it here just in case.

          N 1 Reply Last reply Reply Quote 0
          • N Offline
            Nate Hales @Christian Robinson
            last edited by

            @Christian-Robinson Thanks! I am novice but I am going to use this accomplish my goals; (to copy my other post) I would like to disable or override Alexas voice and only hear what I want it to say. For example, when my Smarthings sensor on my front door is triggered, my computer will say "front door is open". I have a whole house audio system that I control with my computer. Monoprice Zone amp. I also have software someone built that I can control the 12 zones... My goal here is to have things happen in the house and the house starts talking back (via my computer) I had this all set up years ago with x10 ... but now I am going all to z wave and smarthings. Any ideas if you think I am on the right track with Triggercmd and Autohotkey??

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              Christian Robinson @Nate Hales
              last edited by

              @Nate-Hales

              You can't override Alexa's responses, unfortunately. The "voice" part of the configuration for TRIGGERcmd is for what you say to Alexa.

              1 Reply Last reply Reply Quote 0
              • N Offline
                Nate Hales
                last edited by

                could I use Triggercmd to make my computer talk, like when the front door opens? I can just turn her down. 🙂

                N C 2 Replies Last reply Reply Quote 0
                • N Offline
                  Nate Hales @Nate Hales
                  last edited by

                  ...My computer is my main sound in my house. I run spotify on it... I have alexa on the "Line in" with "Listen" enabled, so I can hear her and whatever is running on my windows 10

                  C ? 2 Replies Last reply Reply Quote 0
                  • C Offline
                    Christian Robinson @Nate Hales
                    last edited by

                    @Nate-Hales

                    Theoretically, yes, as long as you're willing to go with "canned" messages. Windows 10 (and 8, I'm assuming) has some support for text-to-speech, but it's not very accessible. Somewhere I came across a small vbs that can do short messages on the command line:

                    say.vbs

                    set s = CreateObject("SAPI.SpVoice")
                    s.Speak Wscript.Arguments(0), 3
                    s.WaitUntilDone(1000)
                    

                    It's called this way: cscript say.vbs "hello world"

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      Christian Robinson @Nate Hales
                      last edited by

                      @Nate-Hales

                      I just use a passive stereo mixer to allow me to hear my Echo Dot, my TV, my computer, etc. at once. Same concept, basically.

                      N 1 Reply Last reply Reply Quote 0
                      • N Offline
                        Nate Hales @Christian Robinson
                        last edited by

                        @Christian-Robinson
                        I am new to this Triggercmd and am going to research the best way to "Listen" for my Zwave events coming through Smartthings and using Triggercmd to activate the canned messages like "Front door is open" or "Garage has been compromised" or "Welcome home Nate you look amazing today"... I could listen to that every-time i walked in. haha. Any ideas you have I would be happy to hear.

                        C 1 Reply Last reply Reply Quote 0
                        • C Offline
                          Christian Robinson @Nate Hales
                          last edited by

                          @Nate-Hales You're going beyond what I'm doing with Alexa/TRIGGERcmd/home automation, so I don't know if I could help you much. I hope the tools I posted above can be useful, though.

                          N 1 Reply Last reply Reply Quote 0
                          • N Offline
                            Nate Hales @Christian Robinson
                            last edited by

                            @Christian-Robinson Yes Thank you!! Saves a ton of time as I am all about making my house do whatever is possible. 🙂 🙂

                            1 Reply Last reply Reply Quote 0
                            • ? Offline
                              [[global:former-user]] @Nate Hales
                              last edited by

                              @Nate-Hales you said "I have alexa on the "Line in" with "Listen" enabled, so I can hear her and whatever is running on my windows 10"

                              I tried this with alexa and got some odd noises when she was listening so i had to unplug her. Did you have that problem and find a fix or just didnt have it? im in the same setup.. htpc does all the sound.

                              1 Reply Last reply Reply Quote 0

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              • First post
                                Last post