johnbrown8976
2012-07-11 01:08:13
Today, I was browsing facebook, and found that I have granted 200 applications to use my facebook account. I thought it is a good time to remove some of them, most of them were unwanted.
Unfortunately, I realised that there was no way to remove all 200 applications: something like check all option. I have to delete one by one, and confirm each action 2 times.
Suddenly, this reminded me of clicking the same thing again and again in runescape which SRL scripting could do very easily. Thus, I made my mind to write a script to automate the clicking process in facebook. It took less than 10 minutes for me to do it. And I am proud that my knowledge can be used at least somewhere for my betterment.
I apologize if I am not clear with what I say. It is a very simple script as demonstrated in this youtube video.[YOUTUBE]TpXl-HD09Ms[/YOUTUBE]
The script is very basic. i.e No Failsafes, so will go in a continuous loop, if something messes up. However, since it a one time process and you would most probably be watching it, it should be all right.
Unfortunately, I realised that there was no way to remove all 200 applications: something like check all option. I have to delete one by one, and confirm each action 2 times.
Suddenly, this reminded me of clicking the same thing again and again in runescape which SRL scripting could do very easily. Thus, I made my mind to write a script to automate the clicking process in facebook. It took less than 10 minutes for me to do it. And I am proud that my knowledge can be used at least somewhere for my betterment.
I apologize if I am not clear with what I say. It is a very simple script as demonstrated in this youtube video.[YOUTUBE]TpXl-HD09Ms[/YOUTUBE]
The script is very basic. i.e No Failsafes, so will go in a continuous loop, if something messes up. However, since it a one time process and you would most probably be watching it, it should be all right.
program facebook;
{$i srl\srl.simba}
var
i, x, y, bmp1, bmp2, numApp: Integer;
begin
ActivateClient;
MouseSpeed := 20;
numApp := 100; //how many applications to remove
//Close button Bitmap (Cross sign)
bmp1 := BitmapFromString(10, 12, 'meJz7/58i8OXdq2t718K5QDZQBJ' +
'kLQWhsTAWYUpgm4JLCYyxWE/C7mUYAANmFUHs=');
//check button Bitmap
bmp2 := BitmapFromString(17, 18, 'meJzNktsOwUAQht//hjchQeJMnA' +
'WN0y5lW2wPq9uutBF1bRC9EKvciD9/drOz800mmTkef6dkMvGJn5B' +
'TnF4ixWzqyaVculrMNWrlNwgeDyOr84mm4q1OOq1GLLKYKms82xCV' +
'bnXLNPq97htkOVVWaEKWCIqbBmXMdhxHUUYypJLPXDvR1ibdQaYQ4' +
'nDTAiMZUi8XoBPbtlzX9X0/+t3omgxp1iu2ZXLOoTIEIRKGIZyGQW' +
'VIt9285wdBAM/zQ4wxGTIaDjBCGiGU7vZ75nmuEJ6Ai3MZ8u30v92' +
'xP9QFTxkViQ==');
for i:=0 to numApp do
begin
//Click the close button
while not FindBitmap(bmp1, x, y) do
wait(1000);
Mouse(x, y, 0, 0, mouse_Left);
//Click the check button
while not FindBitmap(bmp2, x, y) do
wait(500);
Mouse(x+5, y+10, 0, 0, mouse_left);
//Click the remove button
Mouse(x+330, y+10, 0, 0, mouse_left);
wait(2000);
end;
FreeBitmap(bmp1);
FreeBitmap(bmp2);
end.