Initial mouse() use in SMART
If GetMousePos() returns (-1, -1), then pick a random point from Client edge.
I frequently toggle enable/disable SMART to fiddle here and there and when my script resumed it always moved the mouse from the top left corner. So I wrote some code.
I place it in both _brakeWindMouse and _humanWindMouse, before TDist is set-up; requires 2 extra Integers. (clW, clH)
Code:
if (xs = -1) and (ys = -1) then
begin
GetClientDimensions(clW, clH);
case random(100) of
0..24:
begin
xs := random(clW);
ys := 0;
end;
25..49:
begin
xs := random(clW);
ys := clH;
end;
50..74:
begin
xs := 0;
ys := random(clH);
end;
75..99:
begin
xs := clW;
ys := random(clH);
end;
end;
end;