SRL Archive - Research & Development Lounge

OpenInternet(Site:String) and OpenMozilla(Site:String)


Mr_Bum

2008-12-26 02:29:43

I was bored so i decided to make this. Dont think it has much use though. Oh well

Internet Explorer:

{*******************************************************************************
procedure OpenInternet(Site:String);
By: Mr_Bum
Description: Opens internet and goes to the site specified by the user
Use: OpenInternet(http://www.villavu.com/forum/showthread.php?t=40084?p=520807')
*******************************************************************************}

Procedure OpenInternet(Site:String);
var
x,y,I : Integer;
IE,Start,Run : Integer;
begin
Start := BitmapFromString(7, 10, 'beNoB0gAt/64L/3sR/5Y0/7Rq' +
'/4An5lILtzcNV2VB/4EV/6FH/61i/24T2EgLo0QgOlw0/4ob/69W/' +
'55F+WALyT0LhVg3OF4oqmQmnW5ItlAaxTABoRMBY188RGsUUnWlT3' +
'imN1d5UkVCVkIsP1s3SG0Biqf/nbL/XX37NVPoNlh4MlgqUXUNprz' +
'/k67/XHj+NEXkNUh8ZHMkXX8ursL/gZ3/UWr2LzzdOVhOoYMCyacQ' +
'qr//cI3/RVvwMT68Q181qooFzqgLn7n/YoD/OUvoMkSLb3YitpQJ1' +
'5f9Yag=');

Run := BitmapFromString(3, 9, 'beNp7dZ+x4C4EpW15AUJbX/z7fBu' +
'Crl7cD0FLly6AoL8w8B8GPn98C0SfPr59++oBCAEAnYxBtQ==');
begin
If(FindBitmap(Start,x,y))then
begin
Mouse(x,y,0,0,true);
If(FindBitmap(Run,x,y))then
begin
Mouse(x,y,0,0,true);
Wait(100);
TypeSend('iexplore.exe');
Wait(1000 + Random(500));
ClickMouseBox(82, 34, 703, 50,True);
Repeat
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Inc(I);
until(I=100)
TypeSend(Site);
Writeln('Opened ' + Site 'In Internet Explorer');
end;
end;
end;
FreeBitmap(Run);
FreeBitmap(Start);
end;

Mozilla FireFox:

{*******************************************************************************
procedure OpenMozilla(Site:String);
By: Mr_Bum
Description: Opens Mozilla FireFox and goes to the site specified by the user
Use: OpenMozilla('www.google.com.au')
*******************************************************************************}

Procedure OpenMozilla(Site:String);
var
x,y,I : Integer;
Start,Run : Integer;
begin
Start := BitmapFromString(13, 12, 'beNoB1AEr/sgMuow+/4Eo/3s' +
'R/5Y0/7Rq/4An5lILtzcNWGVCPWUKZJAGe7kheb0n5YQu/4Aj/4EV' +
'/6FH/61i/24T2EgLo0QhOlw0RWoBcqQKgcULj9oL/4Iq/3kT/4ob/' +
'69W/55F+WALyT0LhVg3OF4oUHUEebMLhcwLk+AL22YN008BqmQmnW' +
'5ItlAaxTABoRMBY188RGsUYYkHfbsLitILl+YLYXZ9TWN/UnWlT3i' +
'mN1d5UkVCVkIsP1s3SG0BcqAKgcILjtgLnO0LR3LvUX7/iqf/nbL/' +
'XX37NVPoNlh4MlkqUXUNbqcLgcgLjd0LlewLUHj/bY3/prz/k67/X' +
'Hj+NEXkNUl8ZHMkXX8vV3cxXH4uaIkxbIUvVHz/e5n/rsL/gZ3/UW' +
'r2Lz3cOVhOoYMCyKcQtKclmaAnp6cpzrsiXYH/jKf/qr//cI3/RVv' +
'wMT+8Q181qooFzqgL5rkL/s0L/9YL/9kLao3/pb3/n7n/YoD/OUvo' +
'MkWKb3YitpQJ164L7sAL/9EL/9cL/9YLZ37neo3gb4TxVG3zMkLfN' +
'U9emoYGwp4L3rML9MUL/9QL/9cL/9ILRGdEO2E7PWBCOlawKkGsS2' +
'FFrIwGy6YL5bgL+8oL/9YL/9oL8mdl4SE=');

Run := BitmapFromString(3, 9, 'beNp7dZ+x4C4EpW15AUJbX/z7fBu' +
'Crl7cD0FLly6AoL8w8B8GPn98C0SfPr59++oBCAEAnYxBtQ==');
begin
If(FindBitmap(Start,x,y))then
begin
Mouse(x,y,0,0,true);
If(FindBitmap(Run,x,y))then
begin
Mouse(x,y,0,0,true);
Wait(100);
TypeSend('firefox.exe');
Wait(5000 + Random(5000));
ClickMouseBox(200, 61, 737, 74,True);
Repeat
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Inc(I);
until(I=100)
TypeSend(Site);
Writeln('Opened ' + Site + 'In Mozilla FireFox');
end;
end;
end;
FreeBitmap(Run);
FreeBitmap(Start);
end;

Tell me what you think. Might not work for some people because of bad address bar finding. Doesnt actually have a porpose. Maybe when your script finishes you can make it go to your script thread.

Naum

2008-12-26 04:56:09

OpenWebPage

;)

But still a good application, although the icon maybe different for other people (run icon) as it differs in Xp and Vista.

jakeyboy29

2008-12-26 07:59:16

doesnt complie…

n3ss3s

2008-12-26 08:54:42

From: jakeyboy29
doesnt complie…


SRL Member should be enough of a scripter to post the error…

jakeyboy29

2008-12-26 08:58:45

From: n3ss3s
SRL Member should be enough of a scripter to post the error…


Line 26: [Error] (26:1): Unknown identifier 'Mouse' in script 

try adding srl…

n3ss3s

2008-12-26 09:58:38

From: jakeyboy29
Line 26: [Error] (26:1): Unknown identifier 'Mouse' in script 

try adding srl…


[FAIL STAMP]


He posted a function! Not a script! It's your job to add SRL unless you figure out how to use the include directive inside a function.

Bobarkinator

2008-12-26 16:49:44

From: n3ss3s
unless you figure out how to use the include directive inside a function.


I would like that also.

Mr_Bum

2008-12-26 20:45:51

From: NaumanAkhlaQ
OpenWebPage

;)

But still a good application, although the icon maybe different for other people (run icon) as it differs in Xp and Vista.


Thanks. Where is OpenWebPage in srl? Had no ida about that.

TViYH

2008-12-26 20:54:10

It's in SCAR, not SRL.