Jump to content
Sign in to follow this  
BrianCJ

Script to Delete wall posts on Facebook

Recommended Posts

BrianCJ

So ive been trying to clean up my Facebook wall, and there are a TON of posts. Facebook has no way to actually go through and delete all the posts so you have to manually go through and delete them one at a time.... sounds like a perfect job for AutoIt. So i open my profile and for the life of me i cant see on the source where i would be pressing for the delete button on the little dropdown menu for each wall post. Anyone have any suggestions?

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

HotKeySet("=", "CleanUp")
HotKeySet("`", "MyExit")

$oIE2 = _IEAttach("Facebook | YourNameHere")
$iBody = _IEBodyReadHTML($oIE2)
$oTimeout1 = 3000
$oTimeout2 = 5000

While 1
    WEnd

Func CleanUp()
    while 1
    $iBody = _IEBodyReadHTML($oIE2)
    If  **the delete button is found**  Then
        **press the delete button**
    Else
        If StringInStr($iBody, "Show Older Posts...") Then
            _IELinkClickByText ($oIE2,2 "Show Older Posts...")
            _IELoadWait($oIE2, $oTimeout1, $oTimeout2)
        Else
            Exit
        EndIf
    EndIf
    Sleep (5000)
    WEnd
EndFunc


Func MyExit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
anthonyyyg

Your question might be a bit old, but you could try using "_IEGetObjByName" and have it look for "delete"

Hope that helps.

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  

×