View Full Version : 2 Questions
in FindObjEx(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol, Step, xs, ys, xe, ye: Integer)
what does "Step" mean?
and also how would i do something like this:
if my run energy is less than 50, then rest until it is 100
Brandon
01-01-2012, 04:38 AM
I think step is how much to increment each search by.. like for the angle thing, 1 step would be to increase each angle by 1 until it gets to the final angle.. Iunno what it is though for findobjex because I write my own custom functions for object finding..
As for the Run Energy..
If RunEnergy(50) then
RestUntil(99);
I think step is how much to increment each search by.. like for the angle thing, 1 step would be to increase each angle by 1 until it gets to the final angle.. Iunno what it is though for findobjex because I write my own custom functions for object finding..
As for the Run Energy..
If RunEnergy(50) then
RestUntil(99);
Oh ok thanks.
I tried this already: If RunEnergy(50) then
RestUntil(99);
it doesnt work.
Brandon
01-01-2012, 04:55 AM
Try this:
Function DoRest: Boolean;
var
S: String;
RunE: Integer;
begin
RunE:= GetMMLevels('run', S);
if (RunE < 50) then
begin
SetRest;
while (RunE < 98) do
wait(1);
end;
Result:= (RunE = 100);
end;
Try this:
Function DoRest: Boolean;
var
S: String;
RunE: Integer;
begin
RunE:= GetMMLevels('run', S);
if (RunE < 50) then
begin
SetRest;
while (RunE < 98) do
wait(1);
end;
Result:= (RunE = 100);
end;
wow thanks so much works perfect. will give credit.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.