@RayHollister, yes, you can download the tcmd tool and create a script like this:
tcmd --computer "laptop" --trigger "Trigger A"
tcmd --computer "laptop" --trigger "Trigger B"
... and have Trigger C run that script.
@RayHollister, yes, you can download the tcmd tool and create a script like this:
tcmd --computer "laptop" --trigger "Trigger A"
tcmd --computer "laptop" --trigger "Trigger B"
... and have Trigger C run that script.
@Richard-Rico, awesome, good job. I'll suggest that in the future. That's a simple way to fix it.
@Richard-Rico, can you send me the output of this command?
systemctl status triggercmdagent
I wonder if you installed the background service while you were root. If you do that, it will use your /root/.TRIGGERcmdData folder. Generally, you want to run it like this while logged in as your user so it will use your regular user's data folder:
sudo sh /usr/lib/triggercmdagent/resources/app/src/installdaemon.sh
Either way the actual service/daemon will run as root, so the difference is which data folder it will use.
The reason it's only giving you one command is the background agent adds/removes/runs background commands, and the foreground agent adds/removes/runs background commands.
Look at your ~/.TRIGGERcmdData/commands.json to see which commands are background vs. foreground commands.
@tsanchez, I found your subscription and cancelled it.
Subscription ID : I-TGNG50GBAB0V
@pongsatonn-siripet, for that, I would write an AutoIT script that clicks specific coordinates on that program window, then types your input values.
When you install AutoIt, it will come with this "AutoIt Window Info" tool. If you drag the little Finder Tool to a spot on your program window, it will give you coordinates. You can write a script that clicks those coordinates, then types something. I set the AutoIt Window Info Coord Mode to Window so the coordinates it's giving me are relative to the upper left cornder of the window. The windows screenshot tool removed it but I've got that finder tool target dragged to the upper-left of my calculator window, that's why you see low numbers for the "ControlClick Coords" are 2,7 and Mouse Position is 10,8. If the target was further down and to the right, those numbers would be higher. Anyway, you can give those as your inputs to the script to pick a place for your AutoIt script to "click" before typing your input values. Good luck. I recommend trying the built-in AI Script Assistant if you're subscribed, or you could use ChatGPT to write the script.
I got this output from ChatGPT with this prompt:
autoit script to click a coordinate on a specific window, and type something.
; Specify the title of the window you want to target
Local $windowTitle = "Your Window Title"
; Activate the window
If Not WinActivate($windowTitle) Then
MsgBox(0, "Error", "Window not found!")
Exit
EndIf
; Wait for the window to be active
WinWaitActive($windowTitle)
; Specify the coordinates where you want to click (relative to the window)
Local $x = 100 ; X coordinate
Local $y = 200 ; Y coordinate
; Click the specified coordinates
MouseClick("left", $x, $y)
; Sleep for a short duration to ensure the click is registered
Sleep(100)
; Type the text you want
Send("Hello, this is a test!")
; Optionally, you can send an ENTER key or other keys
; Send("{ENTER}")
One cool thing about AutoIt is it can produce a Windows .exe. Then you can run the .exe as a TRIGGERcmd command.
You don't have to connect a screen - just plug in a pair of headphones and listen for the pair code when the Raspberry Pi boots up.
This updated article has all of the details.
@foyalcolibris, you could remove the Voice word so it won't show up as a device in Google Home or Alexa.
@iswasdoes, nice. I'm glad you figured it out.
@pongsatonn-siripet, I looked the the Microsoft article you sent.
I see this on that page about the error you're getting:
Cause
This error means a Power Automate license is required for the current user to do the action
@pongsatonn-siripet are you saying you cannot get to the GUI Command Editor? That's where you should see "+ Add Command", "+ Browse Example", and "+ Computer List
You should have a TRIGGERcmd tray icon if you click the up arrow in the lower-right near your clock. Here's a screenshot where I right-clicked my TRIGGERcmd tray icon. You can see the "GUI Command Editor" in the menu.
@pongsatonn-siripet , please open your GUI Command Editor, click Add Command, and paste your command in the Command field.
start C:\Users\PlugAcer\Desktop\MetaTrader5\terminal64.exe
Then you can select your new "DESKTO-PRILT4PP | MetaTrader5" command in IFTTT.
There's no need for parameters in this case - you should leave that blank in your IFTTT applet.
@pongsatonn-siripet, you have the Computer and Command fields correct. Parameters are optional.
Maybe I should have named the "Command" field "Trigger" instead, but you figured it out - it's the name of your triggercmd command/trigger, like notepad.
I suggest you remove "start" from Parameters, otherwise your command will be "notepad start" if you've enabled parameters on your Notepad command. Parameters are appended to the end of the command if you've enabled parameters in the GUI Command Editor like this:
Please test it again, I fixed it.
Thank you so much for reporting this. It definately was a bug!
@Emanuel-Werner, are you using "If any command is triggered ..." as your applet trigger? Or are you using "Specific command"?
I'll test this later today to see if I can reproduce the issue.
EDIT: I was able to reproduce the issue. Like you, I setup 2 applets that were supposed to run when two separate specific commands ran, but when I ran one command, both applets ran. Thank you for reporting this bug. I'll work on it and let you know when it's fixed.
@Bryan-Madrigal it is a common problem because it's not obvious to new users. I'll think about where to put that information so new users will see it.
FYI, your first computer is automatically your default computer, but I suspect you deleted it and re-created it.
@Bryan-Madrigal, I see the problem.
You don't have a default computer, and your computer doesn't have a voice name.
Virtual switches will only be added to Google Home (or Alexa) if one of these is true:
Your computer is your Default computer. You can set that in your profile page.
Your computer has a Voice Name
I recommend #1 because the virtual switches will have a shorter name - like "Calculator" instead of "Calculator on Computer"
@iswasdoes, you could try downloading the latest again, or download this older version:
@iswasdoes, I just tested the latest version of the installer and it worked for me.
You could try temporarily disabling your antivirus software in case that's blocking it.
Or, please check your tray icons - maybe the TRIGGERcmd icon will be there because it actually installed.