Sign in to follow this  
Followers 0
wahfun

Script to open secure website and login

5 posts in this topic

Hello. I have never used AutoIt other than to write the little simple practice scripts. Now I am ready to tackle something useful but am not having much luck on my own. So after trying to seek out how to do it on my own, I am asking for help.

I run a windows 7 box with 3 MB ram, AMD dual processors running at 2 Ghz.

I want to write a script that will:

1.open firefox

2.load a secure website

3.login with user name and password

4.wait until activity is done

5.open a second secure site

6.login with user name and password

I have seen the ffau3 commands but am overwhelmed by them. If someone can help, I sure would appreciate it. This should also help me learn a good deal more about how to use AutoIt.

Thx,

Wah

Share this post


Link to post
Share on other sites



Hello. I have never used AutoIt other than to write the little simple practice scripts. Now I am ready to tackle something useful but am not having much luck on my own. So after trying to seek out how to do it on my own, I am asking for help.

I run a windows 7 box with 3 MB ram, AMD dual processors running at 2 Ghz.

I want to write a script that will:

1.open firefox

2.load a secure website

3.login with user name and password

4.wait until activity is done

5.open a second secure site

6.login with user name and password

I have seen the ffau3 commands but am overwhelmed by them. If someone can help, I sure would appreciate it. This should also help me learn a good deal more about how to use AutoIt.

Thx,

Wah

mouseclick (x,y,1,500) ----> coord of ur mozzilla icon....

mouseclick (x,y,1,500) ----> coord of moxilla Url bar

Send ("adress of ur site",0)

mouseclick (x,y,1,500) ----> coord of the Username box

Send ("username",0)

mouseclick (x,y,1,500)----> coord of the Passwordbox

Send ("password{ENTER},0)

mouseclick (x,y,1,500) ----> coord of moxilla Url bar

Send ("adress of ur site",0)

mouseclick (x,y,1,500) ----> coord of the Username box

Send ("username",0)

mouseclick (x,y,1,500)----> coord of the Passwordbox

Send ("password{ENTER},0)

simply as that....

Side notes.: it will surely work and u can do it with 1 hour or 2 but u will have the problem that u need to have a Static coordination.... i mean if the Boxes location change then it will not work, pluss even if u change Resolution... this kind of solutions works great untill u will keep it private, if u are going to make a pubblic relase it is not the right way to do it, obviusly if they have not the same coord or if u put the coord as a variable and make it to calculate automatically the Resolution.... don't ask me how to do it... i saw it 1 time but i forgot it and never had the way to find how to do it again...

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I want to write a script that will:

1.open firefox

2.load a secure website

3.login with user name and password

4.wait until activity is done

5.open a second secure site

6.login with user name and password

I have seen the ffau3 commands but am overwhelmed by them. If someone can help, I sure would appreciate it. This should also help me learn a good deal more about how to use AutoIt.

Using the FF.au3 is very simple:

#include <FF.au3>

_FFStart("https://yourLoginSite.internet") ; open FF with the secure website

If _FFIsConnected() Then
_FFSetValueById("the_id_of_the_input", "UserName") ; sets the username
; id from the html-input e.g. <input type='text' id='the_id_of_the_input' name='name_of_the_input' ...>
; or _FFSetValueByName - depending on the input
_FFSetValueById("the_id_of_the_input", "Password")

_FFFormSubmit() ; submits the first form on the page and waits while the page is loading

_FFOpenURL("https://theNextSite.intert") ; open the page and waits while the page is loading 

; ... the same procedure like above
EndIf

Instead of searching the input-fields in the HTML-source you can try this function:

http://www.autoitscript.com/forum/index.php?showtopic=102133&st=0&p=725429

Then you can do:

#include <FF.au3>
#include "_FF_AutoLogin.au3"

If _FFConnect() Then

_FF_AutoLogin("UserName", "PassWord", "https://yourLoginSite.internet")
_FF_AutoLogin("UserName", "PassWord", "https://theNextSite.intert")

EndIf
Edited by Stilgar

Share this post


Link to post
Share on other sites

Thx Stilgar. That sounds simple enough to follow. Now, where do I download the actual ff.au3 file and where do I put it once downloaded? Sorry, for the newbie questions but maybe I will be able to return the favor by helping someone else.

Thx

Share this post


Link to post
Share on other sites

You can download it here. Once downloaded, put it in the include directory. The default path of the directory is "C:\Program Files\AutoIt3\Include".


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

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