Sign in to follow this  
Followers 0
Cameltoe

Scripting login script

3 posts in this topic

I need help with this script im making!

just to start out, here is my script

#include <IE.au3>

$oIE = _IECreate ("http://mafiano.com")

if winactive("MafiaNo // Logg inn - Windows Internet Explorer") Then

sleep (500)

WinSetState("MafiaNo // Logg inn - Windows Internet Explorer","", @SW_MAXIMIZE)

sleep(500)

$state = WinGetState("[MafiaNo // Logg inn - Windows Internet Explorer]", "")

If BitAnd($state, 32) Then

MsgBox(0, "Example", "Window is ready! type your Username and password")

EndIf

I'm new to AutoIt sorting this would give me a kick start.

im the test first then read after dude but i need somewere to start.

my goal is to create a script that does thing for me.

would be great with help with some more:

How do i use user input (when logging in)

How can i make the script click links

How can i make the script repeat 1 part example:

part1

link1: blabla.com

link2: blabla.com

sleep for a min or 2

part2

link3: blabla.com

link4: blabla.com

then goto part 2.

Thanks for all in advance!

Btw auotit rocks! i cant understand it but yet i love it!

Share this post


Link to post
Share on other sites



Don't enlarge/bold cries for help, all of us can read what you're saying at normal font

If I understand you correctly, you want to open a browser window to a certain link and then login to the page that appears when you do this?

If so I went to http://mafiano.com/index2.php

I noticed if I loaded the page and then hit "tab" one time in firefox, it went to user name, another tab took me to password and one more tab took me to "login". In internet explorer, I had to hit tab 8 times before it went to the username location

So basic code would be

#include <ie.au3>           ; required for the _IELoadWait

Opt("Sendkeydelay", 50)     ; pauses 50 milliseconds in between sending characters

$iewindow = _IECreate ("http://mafiano.com/index2.php") ; creates the webpage in IE and assigns variable $iewindow to it
_IELoadWait($iewindow)      ; pauses script execution until the page fully loads

Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("Username")            ; sends whatever is in quotes
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("Password")            ; sends whatever is in quotes
Sleep(50)                   ; sleeps 50 milliseconds
Send("{tab}")               ; sends a tab
Sleep(50)                   ; sleeps 50 milliseconds
Send("{Enter}")             ; sends the enter key to log In



ConsoleWrite("Program complete" & @crlf)    ; writes to the console window below the auto it window saying the script completed, @crlf does a carriage return in case you have another console write

It worked on my machine, let me know how it works

I need help with this script im making!

just to start out, here is my script

#include <IE.au3>

$oIE = _IECreate ("http://mafiano.com")

if winactive("MafiaNo // Logg inn - Windows Internet Explorer") Then

sleep (500)

WinSetState("MafiaNo // Logg inn - Windows Internet Explorer","", @SW_MAXIMIZE)

sleep(500)

$state = WinGetState("[MafiaNo // Logg inn - Windows Internet Explorer]", "")

If BitAnd($state, 32) Then

MsgBox(0, "Example", "Window is ready! type your Username and password")

EndIf

I'm new to AutoIt sorting this would give me a kick start.

im the test first then read after dude but i need somewere to start.

my goal is to create a script that does thing for me.

would be great with help with some more:

How do i use user input (when logging in)

How can i make the script click links

How can i make the script repeat 1 part example:

part1

link1: blabla.com

link2: blabla.com

sleep for a min or 2

part2

link3: blabla.com

link4: blabla.com

then goto part 2.

Thanks for all in advance!

Btw auotit rocks! i cant understand it but yet i love it!

Share this post


Link to post
Share on other sites

Hi gte!

I tried your script except in my case I was logging in with an 8 digit account number and password.

At first it would not login. Then I noticed the first digit of my account number was being clipped.

When I added another first digit to the front of the account number then your script ran nicely.

I'm puzzled at this behaviour....any clues?

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
Sign in to follow this  
Followers 0