Jump to content

Post Comment on Facebook


boshi
 Share

Recommended Posts

Hello all,

I am working on a simple script that can run through array of facebook page url and what it does is, it will post a comment to the latest post on the wall of the page. My problem is, I do not know how the Submit button in Facebook can be click, because it will only appear when the mouse click on the text area to enter the comment. I am using embedded IE and I want the window to always minimize if its running. Please help me anyone. Really appreciate your help

Do
        If Not _FileReadToArray($urlSrc,$urlArray) Then
        MsgBox(4096,"Error", " File url.txt not found in your script directory")
        EndIf
        For $x = 1 to $urlArray[0]
        _IENavigate( $IE, $urlArray[$x] )           ;Msgbox(0,'Record:' & $x, $urlArray[$x])
        $oForm = _IEFormGetObjByName ($IE, "add_comment")
        $oQuery = _IEFormElementGetObjByName ($oForm, "add_comment_text")
        $oSubmit = _IEFormElementGetObjByName ($oQuery, "comment")
        ;If Not _FileReadToArray($msgSrc,$msgArray) Then
        ;MsgBox(4096,"Error", " File msg.txt not found in your script directory")
        ;EndIf
        _IEFormElementSetValue ($oQuery, "this is the comment need to post")
        _IEAction ($oQuery, "visible")
        _IEAction ($oSubmit, "visible")
        _IEAction ($oForm, "visible")
        Sleep(10000)
        _IEAction ($oForm, "click")
        Next
    $i = $i + 1
    Until $i = GUICtrlRead($Loop)
Link to comment
Share on other sites

  • 1 year later...

i know i am reviving a very old post , but i am wondering if

$oForm = _IEFormGetObjByName ($IE, "add_comment")
        $oQuery = _IEFormElementGetObjByName ($oForm, "add_comment_text")

i am pretty sure the add_comment_text part still works from a little scouting that i ve done in the code window of facebook page, but i cant get the obj name... anyone trying anything similar?

Link to comment
Share on other sites

  • Moderators

Kolsos,

Welcome to the AutoIt forum. :)

The Forum Rules have changed since this thread was started - we no longer permit discussion of log-in methods and forum auto-posters, so I am locking this thread.

See you back soon with a legitimate question I hope. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...