Code:
program linkedinCrawler;
{$I SRL-OSR/SRL.simba}
var
clientHeight, clientWidth, linkedinButton, pYMKButton, removeProfileButton, connectRegionButton, DTMx, DTMy, counter: Integer;
procedure initDTMs;
begin
linkedinButton:= DTMFromString('mbQAAAHicY2VgYDgHxHeA+C4Q74HiYCB2BOJEKHYC4gnHHjA4Z9UxKAfngLEjkI0NMGLBYAAAa8EL8A==');
pYMKButton := DTMFromString('mkwEAAHicE2ZgYAhnhuAYII6FspuAuB2IW6HsOVC8AIgXAvESKN4JxXuBeB8QLwWatwCKlwDxSiBeDMUrgHgNlL0SipdA+augelYiySckp4JxV08fw5y588Hsnt5+hqqaOga/wBCGO3fvMsQnpcDx0mUrGLbt2Mnw//9/uNjkqdMYnr94wUBNwEhFjAUAANYENgE=');
removeProfileButton := DTMFromString('mbQAAAHicY2VgYEhmZGDYA6RzGSEYxF4HxGGMEPwAij9+/srw//9/MGYo3wrBWAAjFgwGAHo0EQw=');
connectRegionButton := DTMFromString('mbQAAAHicY2VgYDgJxHuAOJcRgkHsRUC6G4pFmSD4////cMxQvhWCsQBGLBgMAFmmEGA=');
end;
function locateDTM (DTM: Integer) : Boolean;
begin
if FindDTM(DTM, DTMx, DTMy, 0,0, clientWidth-1, CLientHeight-1) then
result := true;
end;
function endScript : Boolean;
begin
if (isKeyDown (113)) then
result := true;
end;
begin
SetDesktopAsClient;
GetClientDimensions(clientWidth,clientHeight);
initDTMs;
counter := 0;
DTMx := 0;
DTMy := 0;
writeln ('Finding Home Button...');
repeat
if (LocateDTM(linkedinButton))then
begin
MoveMouse (DTMx, DTMy);
ClickMouse (DTMx, DTMy, mouse_Left);
sleep (4000);
writeln ('Going Home');
end else
begin
writeln ('Can not locate Home Button, please keep simba running and go to linkedin Home page manually.');
sleep (4000);
end;
writeln ('Finding People You May Know...');
if (LocateDTM(pYMKButton))then
begin
MoveMouse (DTMx, DTMy);
ClickMouse (DTMx, DTMy, mouse_Left);
sleep (4000);
writeln ('Meeting People You May Know');
end else
begin
writeln ('Can not locate People You May Know, please click on people you may know manually.');
sleep (4000);
end;
writeln ('Finding last firt person viewed.');
if (LocateDTM(connectRegionButton)) then
begin
MoveMouse (DTMx, DTMy);
sleep (500);
writeln ('Removing the last person viewed.');
LocateDTM(removeProfileButton);
MoveMouse (DTMx, DTMy);
ClickMouse (DTMx, DTMy, mouse_Left);
sleep (500);
end else
begin
writeln ('Can not find the first person to remove, please remove the last person manually.');
sleep (4000);
end;
writeln ('Finding the first person.')
if (LocateDTM(connectRegionButton)) then
begin
MoveMouse (DTMx, DTMy);
ClickMouse (DTMx, DTMy, mouse_Left);
sleep (4000);
writeln ('Viewing the first person ...');
end else
begin
writeln ('can not find the first person to view, please view the first person manually');
sleep (4000);
end;
if (LocateDTM(linkedinButton))then
begin
MoveMouse (DTMx, DTMy);
ClickMouse (DTMx, DTMy, mouse_Left);
sleep (4000);
writeln ('Going Home');
end else
begin
writeln ('Can not locate Home Button, please go to linkedin Home page manually.');
sleep (4000);
end;
writeln ('Finding People You May Know...');
if (LocateDTM(pYMKButton))then
begin
MoveMouse (DTMx, DTMy);
ClickMouse (DTMx, DTMy, mouse_Left);
sleep (4000);
writeln ('Meeting People You May Know');
end else
begin
writeln ('Can not locate People You May Know, please click on people you may know manually.');
sleep (4000);
end;
writeln ('Finding the first person.')
if (LocateDTM(connectRegionButton)) then
begin
MoveMouse (DTMx, DTMy);
ClickMouse (DTMx, DTMy, mouse_Left);
sleep (4000);
writeln ('Viewing the first person ...');
end else
begin
writeln ('can not find the first person to view, please view the first person manually');
sleep (4000);
end;
counter := counter + 2;
writeln ('People viewed: ', counter, '. Press F2 to stop the script');
until (endScript);
writeln ('ending script');
freeDTM(linkedinButton);
end;
its pretty brute if i remembered correctly and i totally forgot most of the simba stuff, but im trying to learn things again.