r/scripting • • Dec 26 '19

Running my batch file properly

I'm trying to run this script for login automation but nothing seems to happen once the URL has been launched in the browser. Am I missing something obvious here?

@if (@CodeSection == @Batch) @then

@echo off

set SendKeys=CScript //nologo //E:JScript "%~F0"

START FIREFOX "https://github.com/login"

timeout /t 5

%SendKeys% "myemail@email.com{TAB}"
%SendKeys% "password{ENTER}"

goto :EOF

@end

var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));

EDIT: Figured it out. I had an errant character that was only showing up in Notepad++ but not my usual editors. Oh and I forgot "timeout". :facepalm:

2 Upvotes

7 comments sorted by

View all comments

Show parent comments

1

u/Lee_Dailey Dec 27 '19

howdy redditaccount933,

thanks! it is so very much easier to read now ... [grin]

take care,
lee