mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-23 15:58:51 -05:00
FindColor test for people who want to test without PS.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@159 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
ae967f063c
commit
bf4e1e5a69
@ -35,8 +35,8 @@
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="42" Y="27"/>
|
||||
<TopLine Value="20"/>
|
||||
<CursorPos X="53" Y="63"/>
|
||||
<TopLine Value="35"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -74,7 +74,7 @@
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
</Units>
|
||||
<JumpHistory Count="7" HistoryIndex="6">
|
||||
<JumpHistory Count="8" HistoryIndex="7">
|
||||
<Position1>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="77" Column="17" TopLine="42"/>
|
||||
@ -103,6 +103,10 @@
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="11" Column="3" TopLine="1"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="59" Column="18" TopLine="40"/>
|
||||
</Position8>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -8,8 +8,10 @@ uses
|
||||
{$ENDIF}{$ENDIF}
|
||||
Classes, SysUtils, CustApp,
|
||||
Forms,Interfaces,
|
||||
LCLIntf,
|
||||
Client
|
||||
|
||||
|
||||
{ you can add units after this };
|
||||
|
||||
type
|
||||
@ -31,7 +33,10 @@ procedure MufasaTests.DoRun;
|
||||
|
||||
var
|
||||
ErrorMsg: String;
|
||||
Time: DWord;
|
||||
C: TClient;
|
||||
I, W, H, X, Y: Integer;
|
||||
|
||||
begin
|
||||
// quick check parameters
|
||||
ErrorMsg:=CheckOptions('h','help');
|
||||
@ -50,7 +55,21 @@ begin
|
||||
|
||||
{ add your program here }
|
||||
C := TClient.Create;
|
||||
writeln('wat');
|
||||
|
||||
C.MWindow.GetDimensions(W, H);
|
||||
Time := GetTickCount;
|
||||
for i := 0 to 100 do
|
||||
C.MFinder.FindColor(X, Y, 0, 0, 0, W - 1, H - 1);
|
||||
writeln('Time: ' + IntToStr(GetTickCount - Time));
|
||||
|
||||
if C.MFinder.FindColor(X, Y, 0, 0, 0, W - 1, H - 1) then
|
||||
begin
|
||||
C.MInput.SetMousePos(X, Y);
|
||||
writeln('found!');
|
||||
end else
|
||||
begin
|
||||
writeln('not found!');
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user