Smartgambler
Pro-Punter

Go Back   OZmium Sports Betting and Horse Racing Forums > Public Forums > General Topics
User Name
Password
Register FAQ Search Today's Posts Mark all topics as read

To advertise on these
forums, e-mail us.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 6th March 2016, 10:31 AM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default Facebook Macro

Who wants to get this working for me, i understand most of it and have written similar in the past with AutoHotKey scripts but not in VBA.

Code:
Sub Login_facebook() Dim ie As Object Dim aelement Dim btnInput Dim btnInputer Set ie = CreateObject("InternetExplorer.Application") ie.navigate "http://www.facebook.com/login.php" ie.Visible = True Do While ie.Busy And Not ie.readyState = 4 DoEvents Loop DoEvents ie.document.all.Item("email").Value = "Your Email" ie.document.all.Item("pass").Value = "Your Password" ie.document.all.Item("login").Click Application.Wait (Now + TimeValue("00:00:02")) ie.navigate "Your Facebook Page" Do While ie.Busy And Not ie.readyState = 4 DoEvents Loop Application.Wait (Now + TimeValue("00:00:05")) Set ElementCol = ie.document.getElementsByClassName("_4j _519b") For Each btnInput In ElementCol btnInput.Click Next btnInput ie.document.all.Item("xhpc_message_text").Click Dim VALUER As String VALUER = Sheets("FB").Range("A1").Value ie.document.all.Item("xhpc_message_text").Value = VALUER Set ElementCol = ie.document.getElementsByClassName("_4j _519b") For Each btnInput In ElementCol btnInput.Click Next btnInput Set ElementColumer = ie.document.getElementsByClassName("_42ft _4jy0 _11b _4jy3 _4jy1 selected _51sy") For Each btnInputer In ElementColumer btnInputer.Click Next btnInputer Application.Wait (Now + TimeValue("00:00:10")) Set inputcollection = ie.document.getElementsByTagName("button") For Each aelement In inputcollection If aelement.getAttribute("class") = "_42ft _4jy0 _11b _4jy3 _4jy1 selected _51sy" Then aelement.Click GoTo 10 End If Next 10 End Sub
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump



All times are GMT +10. The time now is 07:03 AM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2008 OZmium Pty. Ltd. All rights reserved . ACN 091184655