Skip to content

Instantly share code, notes, and snippets.

@MatheusMuriel
Last active October 28, 2020 14:59
Show Gist options
  • Save MatheusMuriel/6abb02fb104f56a38218e91a187ca036 to your computer and use it in GitHub Desktop.
Save MatheusMuriel/6abb02fb104f56a38218e91a187ca036 to your computer and use it in GitHub Desktop.
Batch script para o computador não entrar em modo de espera
@if (@CodeSection == @Batch) @then
@echo off
rem Use [%SendKeys% "argument"] to send keys to the keyboard buffer
rem "%~F0" is complete path of this script
set SendKeys=CScript //nologo //E:JScript "%~F0"
:START_OF_LOOP
timeout 10 > NUL
%SendKeys% "{TAB}"
goto START_OF_LOOP
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment