SRL Archive - SRL Archives

procedure ValidateRSWindow;


devils elbow

2006-05-03 21:53:10

Check this sex machine out:

-Checks to see if the user selected anything as a window, if not, it attempts to find one.
-Checks to see if the selected window is a ScuneRape window, if not, it attemps to find one.
-If the user magically did select a valid ScuneRape window, it does nothing.


procedure ValidateRSWindow;
var
iWinX, iWinY : Integer;
begin
if GetClientWindowHandle = 0 then
begin
Writeln('[SRL] *** No Runescape window selected ***');
Writeln('[SRL] Searching for Runescape window...');
if FindWindowBySize(766, 504) = True then
begin
Writeln('[SRL] ...Runescape window found!');
Exit;
end;
end;
GetClientDimensions(iWinX, iWinY);
if (iWinX <> 766) or (iWinY <> 504) then
begin
Writeln('[SRL] *** Invalid Runescape window selected ***');
Writeln('[SRL] Searching for Runescape window...');
if FindWindowBySize(766, 504) = False then
begin
Writeln('[SRL] ...No window found, please do it manually.');
TerminateScript;
end else
Writeln('[SRL] ...Window found!');
end;
end;

Jagex_Fagex

2006-05-04 02:24:32

hm, it wouldn't work… sorry. my client diemensions are bigger then 766, 504… maybe try find window by name or whatever it is?

XxKanexX

2006-05-04 02:33:07

People use things out of SRL for other reasons, too.

So having that at the start would be a bad idea.

WhiteShadow

2006-05-04 02:36:35

Yea like they say, but hey it is sexy. =P

Great Job.

devils elbow

2006-05-04 14:59:03

From: XxKanexX
People use things out of SRL for other reasons, too.

So having that at the start would be a bad idea.

Heh, true enough. I'll take thjat part out :P. Also, other guy, do you mean your client, as in swiftswitch type thing, or the actual RS applet?

phantombmx

2006-05-04 17:58:57

i think he means his resolution is different.. i use swiftswitch for everything and my res is the same res as most people..

also kane, i think thats why he named it ValidateRSWindow; ;)

Sdcit

2006-05-04 18:49:46

yesyes, it could be called if needed :p

devils elbow

2006-05-04 21:13:37

Oh, I didn't think your resolution chenges the width of the RS applet.

Jagex_Fagex

2006-05-06 03:26:45

yep… i checked the width of it..

var w, h:Integer;

begin
GetClientDimensions(w, d);
Writeln(IntToStr(w));
Writeln(IntToStr(d));
end.

and i mean, www.runescape.com

Pyro

2006-05-06 19:14:16

Are you sure. Im certain the size of the applet doesnt change. It only looks bigger cause of your resolution.

devils elbow

2006-05-06 21:07:40

From: Pyro
Are you sure. Im certain the size of the applet doesnt change. It only looks bigger cause of your resolution.

My thoughts exactly. Oh well, scratch this procedure then :(

Jagex_Fagex

2006-05-11 01:39:30

try it yourself, i change my resolutiojn, use the script, and it's different.

ps. don't scratch it, just use find window by name.
pps. the script i posted in second post of mine in this thread.