selgius7
2014-12-22 17:21:22
EDIT: Final script attached.
So I'm trying to make script for this reaction page: LINK
i think its kinda done, but i have question, which command i should use for searchBox measurements ?
im using constant values at the moment and its not so good i guess..
i know that for runescape its MainScreen.GetBounds()
but how about other windows, like browser ? How to get bounds from like select a client tool ? thanks
So I'm trying to make script for this reaction page: LINK
i think its kinda done, but i have question, which command i should use for searchBox measurements ?
im using constant values at the moment and its not so good i guess..
i know that for runescape its MainScreen.GetBounds()
but how about other windows, like browser ? How to get bounds from like select a client tool ? thanks
program reaction;
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
var
x, y, Count: Integer;
[COLOR="#FF0000"]const
xs := 0;
ys := 0;
xe := 600;
ye := 500;[/COLOR]
procedure start();
var
start: Integer;
begin
Count := 0;
start := DTMFromString('m6wAAAHic42ZgYEhjZGCIBeIYIC6G4kwgTgHiJCQ2SF0+EOcCcQEU50DVJAJxJxQXAfEkIP7//z8Yn3jwhWHtxfdgnLL8AcOXn38Z7rz5wVC+6QlYvnvvCwZSACMJGAkAAINgJdQ=');
if FindDTM(start, x, y, [COLOR="#FF0000"]xs, ys, xe, ye[/COLOR]) then
Begin
movemouse(x, y);
fastclick(Mouse_left);
freedtm(start);
end
end
procedure KeepGoing();
var
Clock: Integer;
begin
Clock := DTMFromString('mwQAAAHic42RgYHjDyMDwEIi/AzETEwPDESB9GYj/APFvIH4ExAZArATEJkCsAsSngNgKiIOA2BYq////fwa9zqtgDGMj0yBMDGAkAsMBAGckHuo=');
if FindDTM(Clock, x, y, [COLOR="#FF0000"]xs, ys, xe, ye[/COLOR]) then
Begin
fastclick(Mouse_left);
freedtm(Clock);
end
end;
procedure Reaction();
var
zalia: Integer;
begin
zalia := DTMFromString('mAAEAAHic42FgYKhhZGAoBeIUIO4FYhsgPgPEoUCcDcR9QLwYiK2BeDcQHwRicyAWgeLJQJwDxElAXA7EuUCcBsQJQNwPxN63s8D4////YPz93w84GxsmFTCSiJEBAJK+K64=');
If FindDtm(zalia,x, y, [COLOR="#FF0000"]xs, ys, xe, ye[/COLOR]) Then
Begin
fastclick(Mouse_left);
FreeDtm(zalia);
Count := Count + 1;
WriteLn(+ inttostr(Count));
end
end;
// main loop
begin
ClearDebug();
start();
Reaction();
Repeat
KeepGoing();
Reaction();
Until(Count > 4);
end.

GetClientDimensions(w, h); stores the dimensions in variables w and h.