Login to ANY website using Scripts.

For all your scripting needs. You can share bat/cmd/js/vba files here.
User avatar
ApatheticEuphoria
LINKS SPECIALIST
Posts: 276
Joined: February 4th, 2014, 12:56 pm
Location: California

Login to ANY website using Scripts.

Postby ApatheticEuphoria » October 12th, 2015, 6:05 am

The number of {TAB}s needed throughout the script is dependent upon the website,test it out yourself first using your browser and tab key on your keyboard...
You may also have to edit the Sleep times depending on the speed of your computer.

===.Bat file===

Code: Select all

@echo off
start http://examplewebsite.com
:WScript.Sleep 10000
:Set a = createobject("wscript.shell")
:a.SendKeys "{TAB}"
:a.SendKeys "Username Goes Here"
:a.SendKeys "{TAB}"
:a.SendKeys "Password Goes Here"
:a.SendKeys "{ENTER}"
FindStr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs & del temp.vbs

Set type to all files and save as [WebsiteHere]Login.bat
Then Run

===Pure VBS===

Code: Select all

set a = createobject("wscript.shell")
a.run "https://websitehere.com"
wscript.sleep (10000)
a.sendkeys "{TAB}"
a.sendkeys "Username Here"
a.sendkeys "{TAB}"
wscript.sleep (1000)
a.sendkeys "Password here"
a.sendkeys "{Enter}"


Set type to all files and save as [WebsiteHere]Login.Vbs and Run.
Wiki Search:
http://ow.ly/VoO7X
Make Phone Calls and Search Videos:
http://ow.ly/VoOdu
Login to ANY webstie:
http://ow.ly/VoOjF
Intro to Admin Rights & Hybrid Scripting:
http://ow.ly/VoOq9

Zunair
Site Admin
Posts: 2422
Joined: January 11th, 2014, 12:29 am

Re: Login to ANY website using Scripts.

Postby Zunair » October 12th, 2015, 11:18 am

how about you get the website name from the file name ?

or make a script that would accept args....
so from Jarvis commands you can call [script.vbs "www.website.com", "{Tab 5}", "username", "{Tab 1}", "pass", "{ENTER}"]

User avatar
ApatheticEuphoria
LINKS SPECIALIST
Posts: 276
Joined: February 4th, 2014, 12:56 pm
Location: California

Re: Login to ANY website using Scripts.

Postby ApatheticEuphoria » October 12th, 2015, 12:30 pm

I suppose that would work as well. Many approaches to this really. :)
Wiki Search:
http://ow.ly/VoO7X
Make Phone Calls and Search Videos:
http://ow.ly/VoOdu
Login to ANY webstie:
http://ow.ly/VoOjF
Intro to Admin Rights & Hybrid Scripting:
http://ow.ly/VoOq9

Zunair
Site Admin
Posts: 2422
Joined: January 11th, 2014, 12:29 am

Re: Login to ANY website using Scripts.

Postby Zunair » October 12th, 2015, 12:54 pm

yup.. then you wont have to make a script for each site... u ll be able to just do that in LINKS commands

Zunair
Site Admin
Posts: 2422
Joined: January 11th, 2014, 12:29 am

Re: Login to ANY website using Scripts.

Postby Zunair » October 12th, 2015, 1:03 pm

It'd be something like this...

Code: Select all

Set args = WScript.Arguments
LoginPage = args.Item(0)
KeyStroke_01 = args.Item(1)
UserName = args.Item(2)
KeyStroke_02 = args.Item(3)
Password = args.Item(4)
KeyStroke_03 = args.Item(5)

SET wshObj = CreateObject("wscript.shell")
wshObj.run LoginPage
WScript.Sleep 5000
wshObj.sendkeys KeyStroke_01
wshObj.sendkeys UserName
wshObj.sendkeys KeyStroke_02
WScript.Sleep 1000
wshObj.SendKeys Password
wshObj.SendKeys KeyStroke_03

save file as LoginTo.vbs
in LINKS command type in [PathToScript]\LoginTo.vbs "https://outlook.com" "{Tab 0}" "^a[username]" "{Tab 1}" "[Pass]" "{ENTER 1}"
... replace strings with [..] as needed.

not tested.. might need some modifications...

What it does?
  • opens outlook.com...
  • does not tab to anything...
  • hits ctrl+a to select all text in username field.. types [username]
  • tabs 1 times
  • enters [Pass]
  • hits Enter key

Thanks! :D

User avatar
ApatheticEuphoria
LINKS SPECIALIST
Posts: 276
Joined: February 4th, 2014, 12:56 pm
Location: California

Re: Login to ANY website using Scripts.

Postby ApatheticEuphoria » October 12th, 2015, 1:27 pm

Dangit Zun,your too clever for your own good.
;)
Wiki Search:
http://ow.ly/VoO7X
Make Phone Calls and Search Videos:
http://ow.ly/VoOdu
Login to ANY webstie:
http://ow.ly/VoOjF
Intro to Admin Rights & Hybrid Scripting:
http://ow.ly/VoOq9

User avatar
Classifiedness
LINKED
Posts: 157
Joined: October 19th, 2014, 12:03 pm

Re: Login to ANY website using Scripts.

Postby Classifiedness » October 12th, 2015, 2:20 pm

keep the good scripts coming :lol:

good script

Thx ;)
Image

Zunair
Site Admin
Posts: 2422
Joined: January 11th, 2014, 12:29 am

Re: Login to ANY website using Scripts.

Postby Zunair » October 12th, 2015, 3:05 pm

ApatheticEuphoria wrote:Dangit Zun,your too clever for your own good.
;)

what do you mean my own good..? trying to spread the some good around here.

brobot
EGG
Posts: 8
Joined: December 29th, 2015, 11:16 pm

Re: Login to ANY website using Scripts.

Postby brobot » February 9th, 2016, 7:03 pm

why won't it work for me :( i created .vbs (using a notepad) placed it on my desktop

i pasted in Links command under Shell Tab under ACTION

[PathToScript]\LoginTo.vbs "https://outlook.com" "{Tab 0}" "^a[username]" "{Tab 1}" "[Pass]" "{ENTER 1}"



i replaced with exact location of the .vbs file and replaced the [username] and [pass] with my actual username and password
so it now looks "something" like this

C:\user\ExactLocation\desktop\LoginTo.vbs "https://TheWebsiteofChoice.com" "{Tab 0}" "^aUserName" "{Tab 1}" "Password" "{ENTER 1}"

including the quotation marks

the .vbs is set to open with Windows Based Script Host

but when i tell LINKS to run the command it says cannot execute :( please help i really want this feature

Zunair
Site Admin
Posts: 2422
Joined: January 11th, 2014, 12:29 am

Re: Login to ANY website using Scripts.

Postby Zunair » February 9th, 2016, 8:42 pm

try putting LoginTo.vbs into %appdata%\LINKS\Customization\Scripts folder

then command will be like:
LoginTo "https://outlook.com" "{Tab 0}" "^a[username]" "{Tab 1}" "[Pass]" "{ENTER 1}"

let us know how it goes.. thanks


Return to “Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest