Jump to content
Sign in to follow this  
Ed McDonough

Website Login

Recommended Posts

Ed McDonough

Here's a simple GUI to login into a website (in this case craigslist).

I want to recreate this using Firefox instead of IE.

Can someone help?

Thanks,

Ed

#include <IE.au3>
#include <GUIConstants.au3>
#include <File.au3>

GUICreate ("Acess Website GUI",600,300)
GUISetBkColor (0x99FFCC)
GUISetState(@SW_SHOW)

GUICtrlCreateLabel("Click a button to begin...", 30, 10, 200)
GUICtrlSetFont (-1,12, 800, 2, "Arial") 

Opt("GUICoordMode",1)
$button1 = GUICtrlCreateButton ("Craigslist",  40, 60, 100)
$close = GUICtrlCreateButton ("Close",  260, 260, 80)

While 1
  $msg = GUIGetMsg()
  Select
    Case $msg = $button1
         $account="email@email.com"
         $pw="password"
      Account($account,$pw)
     Case $msg = $close
        $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
  EndSelect
WEnd 
Exit

;FUNCTIONS
Func Account($account,$pw)

$oIE = _IECreate()
_IENavigate($oIE, "https://accounts.craigslist.org/")

$o_form = _IEFormGetObjByName($oIE, "login")
$o_login = _IEFormElementGetObjByName($o_form, "inputEmailHandle")
$o_password = _IEFormElementGetObjByName($o_form, "inputPassword")

_IEFormElementSetValue($o_login,$account)
_IEFormElementSetValue($o_password, $pw)
Sleep(500)
_IEFormSubmit($o_form)
EndFunc

Share this post


Link to post
Share on other sites
huskies

Install the FF UDF and look at this link

http://www.thorsten-willert.de/Themen/FFau3/Beispiele/FF_AutoLogin.au3?a


<It Shall Be Done>

Share this post


Link to post
Share on other sites
Rorka

If you use ShellExecute(URL) it will load ur default browser

Share this post


Link to post
Share on other sites
Ed McDonough

Sorry, didn't mean to imply I was looking for someone to write this.

Does anyone have a similar code using FF I can look at?

Share this post


Link to post
Share on other sites
Ed McDonough

Got it working - thanks everyone for your help!

Share this post


Link to post
Share on other sites
Confuzzled

Got it working - thanks everyone for your help!

Thanks for sharing your working code...

Share this post


Link to post
Share on other sites
Ed McDonough

Thanks for sharing your working code...

Ooops!

Simple thanks to FF.au3 and FF_AutoLogin.au3

Here's the code:

Enjoy!

#include <FF.au3>
#include <FF_AutoLogin.au3>

$account = "YourName@YourEmail.com"
$pw = "YourPassword"

_FFStart("https://accounts.craigslist.org/") 

;_FFConnect ()
_FF_AutoLogin($account,$pw)

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  

×