Automatically open a browser and enter the site?

I have a 70-year-old grandmother who is not used to using a computer, but she has email and Facebook, and every time she wants to access these sites, I have to help her in this process. So, I got an idea, I know a little about programming, so I tried to make a batch file to automate this process of opening Firefox by typing "www.exemple.com" and logging into my account. With this, she could at least see if there are any email messages or notifications on facebook, but I could just make a batch to open the email site. I would like to know if there is a way to make a program for logging in . Batch file:

ECHO OFF START FIREFOX "WWW.EXAMPLE.COM" "WWW.EXAMPLE2.COM" EXIT 
+7
batch-file
source share
1 answer

I realized that today you can use batch files on Windows computers to enter keyboard commands on websites or other applications if necessary. See here for initial coding information.

The core of the team you find here just looks like

 @if (@CodeSection == @Batch) @then @echo off rem Use %SendKeys% to send keys to the keyboard buffer set SendKeys=CScript //nologo //E:JScript "%~F0" %SendKeys% "{ENTER}" goto :EOF @end // JScript section var WshShell = WScript.CreateObject("WScript.Shell"); WshShell.SendKeys(WScript.Arguments(0)); 

While I am still experimenting and testing this batch file program in different applications, Iโ€™m not sure that the internal work is on what this program does. All I know is to use the java script installed on every Windows computer to enter keyboard commands that will be executed. However, in my experiment, I found that it can also serve as a means to fill in passwords and usernames.

 @if (@CodeSection == @Batch) @then @echo off rem Use %SendKeys% to send keys to the keyboard buffer set SendKeys=CScript //nologo //E:JScript "%~F0" START FIREFOX "WWW.EXAMPLE.COM" rem the script only works if the application in question is the active window. Set a timer to wait for it to load! timeout /t 5 rem use the tab key to move the cursor to the login and password inputs. Most htmls interact nicely with the tab key being pressed to access quick links. %SendKeys% "{TAB}" rem now you can have it send the actual username/password to input box %SendKeys% "{U}" %SendKeys% "{s}" %SendKeys% "{E}" %SendKeys% "{r}" %SendKeys% "{N}" %SendKeys% "{a}" %SendKeys% "{M}" %SendKeys% "{e}" %SendKeys% "{TAB}" %SendKeys% "{P}" %SendKeys% "{4}" %SendKeys% "{S}" %SendKeys% "{S}" %SendKeys% "{W}" %SendKeys% "{O}" %SendKeys% "{R}" %SendKeys% "{D}" %SendKeys% "{ENTER}" goto :EOF @end // JScript section var WshShell = WScript.CreateObject("WScript.Shell"); WshShell.SendKeys(WScript.Arguments(0)); 

Thus, register your grandmother on a specific website. Although this is an approximate example of the code I would try to run, it should still work. If this is not the case, start from scratch with the link I provided. Also, if you need ways to include these special characters, check here .

* EDIT:

Later, I did something similar for myself and found a simpler way instead of printing all% SendKeys%. You can just do

 %SendKey% "Username{TAB}" %SendKey% "Password{ENTER}" 

as an easier way to go through the login process. The only drawback of any of them is that if she decides to change her username, you will have to change the password from the program.

+3
source share

All Articles