Jump to content

Automated login for programs

Recommended Posts


Hello, I'm new to autoit and scripting...
I'm trying to make a script, so that when I start my computer, a program would launch (e.g. skype) and it would automatically fill the name and password and than login.
I found a lot of tutorials for web pages (where it's easy to get textbox and button ID), but none for a "normal" windows program.
So my question is, how do I get the textbox and the login button ID (for skype)? I tried to get the Window info, but I couldn't get the IDs.

I guess it would go something like:

Run(path to skype)
ControlSend (this is what I don't know) ; fill username
ControlSend() ; fill password
ControlClick(login) ; click login button

can someone please help me figure this out so I would be able to do this for programs like skype?

I found this:

but it doesn't help me and I don't know what Skype_X86.bat is...

Sorry for my english and thanks in advance...


Share this post

Link to post
Share on other sites

Hello Neverhood, welcome to the forum.

A quick search with Google, using "skype command line" brought up lots of results.

A quick look at one of them - http://superuser.com/questions/657700/skype-command-line-options

Shows several, with the following two mentioned further down the page.


Two I'm using to autologin combined with /secondary:

  • /username:[your user name]
  • /password:[your password]

Though unfortunately, they no longer appear to work with later versions of Skype.

A more official page is - https://support.skype.com/en/faq/FA171/can-i-run-skype-for-windows-desktop-from-the-command-line

It has been a while since I used Skype and looked at its settings, but I am fairly certain that it can automatically Login if you have that set. There may even be a Registry or INI file entry, that you can toggle with code, that will allow what you want. Weeks if not months, sometimes go by between my uses of Skype, and I am pretty sure I never need to Login, and I don't have Skype running in the background between uses.

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.


What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)


Share this post

Link to post
Share on other sites

Thank you for reply, I managed to write the script with coordinates:


$SKYPE = "C:\Program Files (x86)\Skype\Phone\Skype.exe"
WinMove("[CLASS:TLoginForm]", "", 0, 0)
MouseClick("", 263, 253, 2) 
MouseClick("", 292, 295, 1)
MouseClick("", 366, 353, 1) ;login

I probably didn't have to put so much "sleep" in the code....

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now