mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-24 08:18:52 -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"/>
|
<Filename Value="project1.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="project1"/>
|
<UnitName Value="project1"/>
|
||||||
<CursorPos X="42" Y="27"/>
|
<CursorPos X="53" Y="63"/>
|
||||||
<TopLine Value="20"/>
|
<TopLine Value="35"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -74,7 +74,7 @@
|
|||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="7" HistoryIndex="6">
|
<JumpHistory Count="8" HistoryIndex="7">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="project1.lpr"/>
|
<Filename Value="project1.lpr"/>
|
||||||
<Caret Line="77" Column="17" TopLine="42"/>
|
<Caret Line="77" Column="17" TopLine="42"/>
|
||||||
@ -103,6 +103,10 @@
|
|||||||
<Filename Value="project1.lpr"/>
|
<Filename Value="project1.lpr"/>
|
||||||
<Caret Line="11" Column="3" TopLine="1"/>
|
<Caret Line="11" Column="3" TopLine="1"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<Caret Line="59" Column="18" TopLine="40"/>
|
||||||
|
</Position8>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -8,8 +8,10 @@ uses
|
|||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Classes, SysUtils, CustApp,
|
Classes, SysUtils, CustApp,
|
||||||
Forms,Interfaces,
|
Forms,Interfaces,
|
||||||
|
LCLIntf,
|
||||||
Client
|
Client
|
||||||
|
|
||||||
|
|
||||||
{ you can add units after this };
|
{ you can add units after this };
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -31,7 +33,10 @@ procedure MufasaTests.DoRun;
|
|||||||
|
|
||||||
var
|
var
|
||||||
ErrorMsg: String;
|
ErrorMsg: String;
|
||||||
|
Time: DWord;
|
||||||
C: TClient;
|
C: TClient;
|
||||||
|
I, W, H, X, Y: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
// quick check parameters
|
// quick check parameters
|
||||||
ErrorMsg:=CheckOptions('h','help');
|
ErrorMsg:=CheckOptions('h','help');
|
||||||
@ -50,7 +55,21 @@ begin
|
|||||||
|
|
||||||
{ add your program here }
|
{ add your program here }
|
||||||
C := TClient.Create;
|
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