"Enable/disable/configure multiple monitors on Windows"
https://www.nirsoft.net/utils/multi_monitor_tool.html
MultiMonitorTool.exe /disable \.\DISPLAY3
And, for single monitors, my comment from a year ago still works.
"Enable/disable/configure multiple monitors on Windows"
https://www.nirsoft.net/utils/multi_monitor_tool.html
MultiMonitorTool.exe /disable \.\DISPLAY3
And, for single monitors, my comment from a year ago still works.
@Espino As other threads will tell you, the Token is found when you log into the main site, under Instructions.
https://www.triggercmd.com/user/computer/create
@russ said in Is server down?:
@cris-silva, @DavidPennington , what's not working? I just tested it and it's working for me.
I know AWS (Amazon Web Services) had problems today, so I wonder if that affected Alexa.
It definitely affected Alexa - every literal Smart device became "unresponsive" (about a dozen) so it's not a stretch that all the figurative (I'm blanking on the right word) ones for TriggerCMD would go offline, too.
Create a trigger that calls Nirsoft.net's NirCMD program. It's got a ton of options. I use it to Mute my system but it does have a SetBrightness option.
Set your command to ms-settings:
Google can find you a list of sub commands (e.g. ms-settings:network) for any specific sections.
@mikeh_iver After you installed the software on the other PC, copy the commands.json file from the "C:\Users*username*.TRIGGERcmdData" to the it.
In the discussions here, there is one for setting up TriggerCMD with IFTTT. Works like a charm.
"Alexa, trigger Ubuntu" (I find one word triggers work best but experiment).
@Russ NICE FIND! After only a minute of playing with it, it's near perfect. Only hitch is that the window that keeps getting thrown around has 5 pinned tabs and the tool only seems to recognize the 'Title' of the window with the active tab. That's not the end though because I could have the task scheduler run a batch file with a set of five commands so that one of them will work. It's the only window I keep on that monitor.
Now I just need to figure out the event code for when the USB adapter momentarily craps out so I'll just wait for it to happen again.
Bwahaha!
(Only downside might be if I throw another tab into it for temporary usage. The tool probably won't be able to spot that).
Haven't tried this feature myself but Nirsoft's NirCMD has a "sendkeypress" ability.
https://www.nirsoft.net/utils/nircmd2.html#using
Here's my question though -- how does your VBS script send the keypress to the right window or, on your PC, is F7 being recognized by one program no matter what program is in the foreground?
Nircmd has a WIN feature which lets you activate a window so you could use it twice in a new script, once to activate the window and again to send the keypress.
When I say 'good night' to Alexa, I have been having it run my Hibernate command every night to put my PC to sleep. I got to thinking that sometimes I do want certain programs to run backups, etc. so did a little digging and found this script online.
So, every Sunday night, it -won't- hibernate and will run certain tasks.
@echo off
for /f %%i in ('powershell ^(get-date^).DayOfWeek') do set dow=%%i
if %dow% NEQ Sunday goto shutdown
REM in this area, enter commands for things to run Sunday night (backups, updates, etc)
exit
:shutdown
shutdown /h /f
@Joao-victor-0 That's not TriggerCMD causing the problem, it's another device connected to your PC that's causing it to power back on. If you run the command outside of TCMD, it will do the same thing.
Try unplugging your USB devices and see which one is reawakening your PC.
"2021-08-26 19:54:08 Program: About to install to: C:\Users\User\AppData\Local\Discord"
"2821-08 1-26 19:54:21) Apply 21 ApplyReleasesImpl: Updating shortcut C:\Users\User\Desktop\Discord.Ink"
@Igor-Marinho Looks like you're installing Discord, not TriggerCMD.
@matheus-venancio What is the actual command that you're using? And does it work from a cmd prompt?
@Bruno-Rafael Look through recent posts for NirCmd instructions. It can simulate key presses but I don't know that a virtual press will suffice.
If it does, simply create an Alexa routine with both actions (and you'd probably want to throw a Wait command in between)
@Russ Sorry for the delayed reply; crazy week.
Background was the problem on the one part.
On the other, for some weird reason, Task Scheduler was renaming the actual .job from "SCoff" to "SC off" so that the path was wrong. Once I spotted that, I got it working.
Just to check - I've been running the x86 version of TCMD on that PC for...years? Other than the updated .js, there's no newer version? The main DL is x64.
@Russ D'oh. The link here showed it went to ...node.js so I downloaded from here but now it's clear that it was a page about it so I've DL'd it properly ️
That's back up and running.
Question, though. I switched the command to use SCHTASKS to run a job of the same batch files to circumvent any UAC issues but SCoff doesn't work in either bat or task form. The cmd window -says- it's being called but no window is called. Any ideas?
[
{"trigger":"Users","command":"schtasks.exe /run /tn users","ground":"foreground","voice":"users"},
{"trigger":"Connect","command":"schtasks.exe /run /tn SCon","ground":"background","voice":"connect"},
{"trigger":"Disconnect","command":"schtasks.exe /run /tn SCoff","ground":"background","voice":"disconnect"},
{"trigger":"Remote","command":"schtasks.exe /run /tn SCon","offCommand":"schtasks.exe /run /tn SCoff","ground":"foreground","voice":"Remote","voiceReply":"Okay","allowParams":"true" },
{"trigger":"Reboot","command":"shutdown /r /t 10","ground":"foreground","voice":"reboot"}
]
In case I would need them as separate commands, I created the Connect/Disconnect commands which I think are fine but they don't show in the TCMD trigger page at all.
@Russ That's probably it. The agent.js has a date stamp of Nov 2017. Closed tcmd, updated from your link (old was 23kb, new is 348kb. Quite the diff!)
But, on starting the batch file, I get an "unexpected token" error. It also overwrote my .json file but it was mostly the line above so I'll redo it if I need to. Swapped the old .js back and it runs so something is amiss.
SyntaxError: Unexpected token <
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
@Russ I'm trying to setup an on/off command for some services. The PC is x86 so I'm just editing the JSON file.
Here's the line inside the JSON:
{"trigger":"Remote","command":"C:\Users\STICK10\Documents\SC on.bat","offCommand":"C:\Users\STICK10\Documents\SC off.bat","ground":"foreground","voice":"Remote","voiceReply":"Okay","allowParams":"true" },
When I try to trigger it, it's only running the SC ON batch file, not the OFF. What's my error? Or do I need to set these as two different commands altogether?
Inside TCMD's cmd window:
{ trigger: 'Remote',
id: '____',
params: 'on' }
Running trigger: Remote Command: C:\Users\STICK10\Documents\SC on.bat
Reported: Command Ran
{ trigger: 'Remote',
id: '____',
params: 'off' }
Running trigger: Remote Command: C:\Users\STICK10\Documents\SC on.bat
Reported: Command Ran
@Russ I'm trying to get this to work on an old (out of date) Win10 micro-PC that's x86.
{"trigger":"Users","command":"schtasks.exe /run /tn users","ground":"background","voice":"users"},
Here's the command in the JSON file. If I run the schtasks from a command prompt, it works. If I try to trigger this, it doesn't. Am I missing some syntax?
(The goal is to run a batch file at c:\ which deletes a file in Program Files and replaces it with a backup.)
EDIT: Just needed to change it to Foreground ️
@Contamiply You need a space after the .exe
C:\Windows\MultiMonitorTool.exe /TurnOff 0
Every program/parameter works that way - Windows has to know where the program name ends and the parameters begin.