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.
-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;