loragnor
2013-08-10 22:24:13
Greets - I have the following code snippet:
This is supposed to locate the center of the client, move the mouse there, then draw a box. It should look like this:
[ATTACH=CONFIG]22056[/ATTACH]
However, what it really looks like is this:
[ATTACH=CONFIG]22057[/ATTACH]
Any ideas? Would really appreciate any help as this is making me crazy. :confused:
Procedure test;
var
w,h,ccx,ccy,x1,y2,x2,y2: Integer;
begin
// Get the client dimensions
GetClientDimensions(w,h);
// Get the client center point
ccx:=round(w/2);
ccy:=round(h/2);
SRL_Warn('test','The client center is '+tostr(Point(ccx,ccy)),warn_Debug);
// Move the mouse to client center
mmouse(ccx,ccy,0,0);
// Set the box limits
x1:=ccx-125;
y1:=ccy-120;
x2:=ccx+135;
y2:=ccy-15;
// Draw the box
SRL_Warn('test','The box will be drawn at '+tostr(Point(x1,y1))+', '+tostr(Point(x2,y2)),warn_Debug);
SMART_DrawBox(inttobox(x1,y1,x2,y2));
end;
This is supposed to locate the center of the client, move the mouse there, then draw a box. It should look like this:
[ATTACH=CONFIG]22056[/ATTACH]
However, what it really looks like is this:
[ATTACH=CONFIG]22057[/ATTACH]
Any ideas? Would really appreciate any help as this is making me crazy. :confused: