Harry
2008-04-27 21:56:16
IMO it needs to be more. Or use MouseBox on it or something. The 8,8, Randomness on it right now is not enough.
20,20 would work fine? The tabs are quite large…
Replace
Won't it work? ;)
Oh yeah, and when it clicks on the GameTab, if it tries to click it again (when C < 4) have it do a GetMousePos and have it click that pos, not jumping around on the tab.
Works better and safer IMO.
20,20 would work fine? The tabs are quite large…
Replace
function GameTab(tabnumber: Integer): Boolean;
var
c: Integer;
Coords: TPoint;
begin
if ((Tabnumber < 1) or (TabNumber > 15)) then
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' is no valid GameTab', warn_AllVersions);
Result := False;
Exit;
end;
if not TabExists(tabnumber) then
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' does not exist', warn_AllVersions);
Result := False;
Exit;
end;
if (tabnumber = 14) then
Coords := Point(752, 12)
else if (tabnumber = 15) then
Coords := Point(538, 485)
else if (tabnumber <= 7) then
Coords := Point(540 + ((tabnumber -1) * 33), 185)
else
Coords := Point(540 + ((tabnumber mod 7) * 33), 485);
while not(GetCurrentTab = tabnumber) and (c < 4) do
Begin
Mouse(Coords.x, Coords.y, 8, 8, true);
Inc(c);
end;
Result := (GetCurrentTab = tabnumber);
end;withfunction GameTab(tabnumber: Integer): Boolean;
var
c: Integer;
Coords: TPoint;
begin
if ((Tabnumber < 1) or (TabNumber > 15)) then
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' is no valid GameTab', warn_AllVersions);
Result := False;
Exit;
end;
if not TabExists(tabnumber) then
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' does not exist', warn_AllVersions);
Result := False;
Exit;
end;
if (tabnumber = 14) then
Coords := Point(752, 12)
else if (tabnumber = 15) then
Coords := Point(538, 485)
else if (tabnumber <= 7) then
Coords := Point(540 + ((tabnumber -1) * 33), 185)
else
Coords := Point(540 + ((tabnumber mod 7) * 33), 485);
while not(GetCurrentTab = tabnumber) and (c < 4) do
Begin
Mouse(Coords.x, Coords.y, 20, 20, true);
Inc(c);
end;
Result := (GetCurrentTab = tabnumber);
end;if you wanna make me happy :) Won't it work? ;)
Oh yeah, and when it clicks on the GameTab, if it tries to click it again (when C < 4) have it do a GetMousePos and have it click that pos, not jumping around on the tab.
Works better and safer IMO.