![]() |
|
Facebook Automation. - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: Facebook Automation. (/Thread-Facebook-Automation) |
Facebook Automation. - Reverence - 03-04-2012 Here's a little script to automatically log on to facebook. Function is in there too. If the picture won't load, that's because it's saved on my computer. Code: #include <IE.au3>
#include <File.au3>
#include <GUIConstants.au3>
#include <Misc.au3>
Global $mail, $pass
LoginGUI()
LoginFB($mail, $pass)
Func LoginGUI()
GUICreate("Facebook Login", 400, 135)
GUICtrlCreatePic("fb.jpg", 0, 0, 400, 100)
GUICtrlCreateLabel("E-mail", 20, 120, 100, 100)
GUICtrlCreateLabel("Password", 190, 120, 100, 100)
$Input1 = GUICtrlCreateInput("", 0, 101, 170, 18)
$Input2 = GUICtrlCreateInput("", 171, 101, 170, 18, 0x0020)
$Submit = GUICtrlCreateButton("Log In", 341, 101, 59, 34)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $Submit
LoginFB(GUICtrlRead($Input1), GUICtrlRead($Input2))
Case _IsPressed("0D")
LoginFB(GUICtrlRead($Input1), GUICtrlRead($Input2))
EndSelect
WEnd
GUISetState()
EndFunc
Func LoginFB($mail, $pass)
$Int = _IECreate("http://www.facebook.com/login.php", 0, 1, 1)
$Form = _IEFormGetObjByName($Int, "login_form")
$Query = _IEFormElementGetObjByName($Form, "email")
$Query1 = _IEFormElementGetObjByName($Form, "pass")
$oSubmit = _IEFormElementGetObjByName($Form, "login")
_IEFormElementSetValue($Query, $mail)
_IEFormElementSetValue($Query1, $pass)
_IEAction($oSubmit, "click")
EndFuncRE: Facebook Automation. - 1234hotmaster - 03-05-2012 nice! can you see if you can do it with HTTP Webrequest too?
RE: Facebook Automation. - Asuna_mybb_import7736 - 03-11-2012 Thanks m8! Im new to this language, so it's really nice, you can such things! :lol: Because im so happy today: 1+Rep!
RE: Facebook Automation. - Reverence - 03-12-2012 It's a great language. It can do a lot of things. On top of that, it's easy to learn, everything you need is in the helpfile. RE: Facebook Automation. - Alienbablu - 05-19-2012 what is the use of it....................please tell RE: Facebook Automation. - Reverence - 05-20-2012 (05-19-2012, 11:50 PM)Alienbablu Wrote: what is the use of it....................please tell Please refer to my original post. RE: Facebook Automation. - v1rtuaL.GobliN - 05-27-2012 (05-20-2012, 08:36 AM)Reverence Wrote:(05-19-2012, 11:50 PM)Alienbablu Wrote: what is the use of it....................please tell lol man he is asking this everywhere :epic: Anyway good job. |