Jump to content
Sign in to follow this  
boshi

Post Comment on Facebook

Recommended Posts

boshi

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)

Share this post


Link to post
Share on other sites
Kotsos

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?

Share this post


Link to post
Share on other sites
Melba23

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.