Last active
October 28, 2020 14:59
-
-
Save MatheusMuriel/6abb02fb104f56a38218e91a187ca036 to your computer and use it in GitHub Desktop.
Batch script para o computador não entrar em modo de espera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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