Skip to content

Commit 9f101b2

Browse files
author
cageman
committed
initial commit
0 parents  commit 9f101b2

File tree

238 files changed

+23100
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+23100
-0
lines changed

.gitattributes.htm

+792
Large diffs are not rendered by default.

.gitignore.htm

+1,432
Large diffs are not rendered by default.

Benchmark.au3

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
#cs ----------------------------------------------------------------------------
2+
FastFind Version: 1.8
3+
AutoIt Version: 3.3.6.1
4+
Author: FastFrench
5+
6+
Script Function:
7+
FastFind simple Benchmark.
8+
9+
#ce ----------------------------------------------------------------------------
10+
11+
#include "FastFind.au3"
12+
13+
; In order to acheive full possible speed, I disable all debug features
14+
;FFSetDebugMode(0)
15+
16+
; Use Native Pixelgetcolor() on 100 different points
17+
18+
ProgressOn ( "FastFind Benchmark", "Running...", "Native PixelGetcolor")
19+
$begin = TimerInit()
20+
for $x = 1 to 100
21+
$a = PixelGetcolor($x, 500);
22+
Next
23+
$dif = TimerDiff($begin)
24+
25+
ProgressSet(10, "Native PixelSearch")
26+
; Use Native PixelSearch() on FullScreen (1920x1080) x 100 with ShadeVariation
27+
$begin1 = TimerInit()
28+
for $x = 1 to 100
29+
$a = PixelSearch(0,0,1919,1079, 0x00FF5511, 2);
30+
Next
31+
$dif1 = TimerDiff($begin1)
32+
33+
ProgressSet(20, "FFGetPixel")
34+
; Processing time comparaison with FastFind equivalent : FFGetPixel, that works on a SnapShot.
35+
FFSnapShot() ; To keep it simple, a FullScreen capture here
36+
$begin2 = TimerInit()
37+
for $x = 1 to 2000
38+
; Func FFGetPixel($x, $y, $NoSnapShot=$FFLastSnap)
39+
$a = FFGetPixel($x, 500);
40+
Next
41+
$dif2 = TimerDiff($begin2)
42+
43+
ProgressSet(30, "GetPixel direct DllCall")
44+
; Same with direct dll call => nearly 40% faster
45+
FFSnapShot() ; To keep it simple, a FullScreen capture here
46+
$begin22 = TimerInit()
47+
for $x = 1 to 3000
48+
DllCall($FFDllHandle, "int", "FFGetPixel", "int", $x, "int", 500, "int", $FFLastSnap)
49+
Next
50+
$dif22 = TimerDiff($begin22)
51+
52+
ProgressSet(40, "10x10 FFSnapShot")
53+
; SnapShot BenchMark : 100 SnapShots of 10x10 areas
54+
$begin3 = TimerInit()
55+
for $x = 1 to 100
56+
;Func FFSnapShot(const $Left=0, const $Top=0, const $Right=0, const $Bottom=0, const $NoSnapShot=$FFDefaultSnapShot, const $WindowHandle=-1)
57+
$a = FFSnapShot(0,0,9,9) ; 10x10 pixels area
58+
Next
59+
$dif3 = TimerDiff($begin3)
60+
61+
ProgressSet(50, "FullScreen FFSnapShot")
62+
; SnapShot BenchMark : 100 FullScreen SnapShots
63+
$begin4 = TimerInit()
64+
for $x = 1 to 100
65+
;Func FFSnapShot(const $Left=0, const $Top=0, const $Right=0, const $Bottom=0, const $NoSnapShot=$FFDefaultSnapShot, const $WindowHandle=-1)
66+
$a = FFSnapShot() ; FullScreen Capture
67+
Next
68+
$dif4 = TimerDiff($begin4)
69+
70+
ProgressSet(60, "Simple FFNearestPixel")
71+
; FFNearestPixel BenchMark : 500 simple pixel search in 200x200 area
72+
$a = FFSnapShot(0,0,199,199) ; 200x200 pixels
73+
$begin5 = TimerInit()
74+
for $x = 1 to 500
75+
; Func FFNearestPixel($PosX, $PosY, $Color, $ForceNewSnap=true, $Left=0, $Top=0, $Right=0, $Bottom=0, $NoSnapShot=$FFLastSnap, $WindowHandle=-1)
76+
$a = FFNearestPixel($x,$x,0x002545FA,false) ; Pixel search in 200x200 area, don't force SnapShots each time
77+
Next
78+
$dif5 = TimerDiff($begin5)
79+
80+
ProgressSet(70, "FFNearestSpot - simple usage")
81+
; FFNearestPixel BenchMark : 200 pixel search in FullScreen and ShadeVariation
82+
; As NearestPixel do not expose ShadeVariation, we use FFNearestSpot($SizeSearch, $NbPixel, $PosX, $PosY, $Color, $ShadeVariation=0, $ForceNewSnap=true, $Left=0, $Top=0, $Right=0, $Bottom=0, $NoSnapShot=$FFLastSnap, $WindowHandle=-1)
83+
$a = FFSnapShot() ; FullScreen
84+
$begin52 = TimerInit()
85+
for $x = 1 to 200
86+
; Func FFNearestSpot($SizeSearch, $NbPixel, $PosX, $PosY, $Color, $ShadeVariation=0, $ForceNewSnap=true, $Left=0, $Top=0, $Right=0, $Bottom=0, $NoSnapShot=$FFLastSnap, $WindowHandle=-1)
87+
$a = FFNearestSpot(1, 1, $x, $x, 0x00FF5511, 2, false)
88+
Next
89+
$dif52 = TimerDiff($begin52)
90+
91+
92+
ProgressSet(80, "FFNearestSpot - complex usage")
93+
; FFNearestPixel BenchMark : 500 simple pixel search in 200x200 area
94+
; SnapShot BenchMark : 100 FullScreen SnapShots
95+
$a = FFSnapShot() ; FullScreen Capture
96+
FFAddColor(0x453456)
97+
FFAddColor(0xFF0034)
98+
FFAddColor(0x76FF98)
99+
FFAddColor(0x8723FF)
100+
FFAddColor(0x771122)
101+
FFAddExcludedArea(5,10,10,15)
102+
FFAddExcludedArea(52,52,80,80)
103+
FFAddExcludedArea(120,130,100,180)
104+
$begin6 = TimerInit()
105+
for $x = 1 to 100
106+
; Func FFNearestSpot($SizeSearch, $NbPixel, $PosX, $PosY, $Color, $ShadeVariation=0, $ForceNewSnap=true, $Left=0, $Top=0, $Right=0, $Bottom=0, $NoSnapShot=$FFLastSnap, $WindowHandle=-1)
107+
$a = FFNearestSpot(20, 50, 100, 100, -1, 10, false) ; With ShadeVariation, don't force SnapShots each time
108+
Next
109+
$dif6 = TimerDiff($begin6)
110+
111+
ProgressSet(90, "FFBestSpot - complexe usage")
112+
$begin7 = TimerInit()
113+
for $x = 1 to 100
114+
; Func FFBestSpot($SizeSearch, $MinNbPixel, $OptNbPixel, $PosX, $PosY, $Color, $ShadeVariation=0, $ForceNewSnap=true, $Left=0, $Top=0, $Right=0, $Bottom=0, $NoSnapShot=$FFLastSnap, $WindowHandle=-1)
115+
$a = FFBestSpot(20, 2, 50, 100, 100, -1, 10, false) ; Same as before, but can accept down to 2 pixels only instead of 50
116+
Next
117+
$dif7 = TimerDiff($begin7)
118+
119+
Func TimeSpan($dif, $Nb)
120+
$res = ($dif / 1000)/$Nb
121+
if ($res >= 0.010) Then
122+
return " = "&Round($res*1000)&" mS ("&$Nb&" runs)"&@lf
123+
Else
124+
return " = "&Round($res*1000000)&" µS ("&$Nb&" runs)"&@lf
125+
EndIf
126+
EndFunc
127+
ProgressOff()
128+
MsgBox(0, "FastFind Benchmark", "Elpased time for :"&@lf&@lf&"PixelGetColor" & TimeSpan($dif,100) & "FullScreen PixelSearch with ShadeVariation" & TimeSpan($dif1,100) & @lf & "FFGetPixel" & TimeSpan($dif2,2000) & "Same with direct dllCall" & TimeSpan($dif22,3000) & @lf & "SnapShot 10x10 area " & TimeSpan($dif3,100) & "FullSreen SnapShot" & TimeSpan($dif4,100) & "Simple Pixel Searches in 200x200 area" & TimeSpan($dif5,500) & "Pixel Searches with ShadeVariation in FullScreen" & TimeSpan($dif52, 200) & "Complexe FullScreen searches (20x20 Spot, List of 5 colors with ShadeVariation and 3 excluded rectangles)" & TimeSpan($dif6,100) & "Same as before, but searches best spot containing from 2 to 50 good pixels (FFBestSpot)" & TimeSpan($dif7,100))
129+
130+
131+
; Results : PixelGetColor x 500 = 9.61 Seconds
132+
; FFGetPixel x 500 = 0.0893 Seconds

Changelog.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
- [v1.4] : find the "best spot" - meaning the spot that has the best number of "right" colors.
2+
- [v1.4] : now provided with a tool, FFShowPixels.exe, to find colors, manage color lists, show all occurences of them on the Captured Window, and... automatically generates AutoIt or C++ code.
3+
- [v1.6] : Saves SnapShots on BitMaps (BMP and JPG supported)
4+
- [v1.6] : Modifies SnapShots with "filters" (Keep only some colors or only pixels that have changes. All other pixels can be turned to black).
5+
- [v1.7] : Can change pixels colors on SnapShots (SetPixel)
6+
- [v1.7] : Can access the Raw pixel data of SnapShots (GetRawData)
7+
- [v1.7] : Can draw back SnapShots on Screen.
8+
- [v1.8] : Bug fixes. Deleted
9+
- [v1.8.1] : Bug fixes (FastFind.au3).
10+
- [v1.8.2] : Bug fixes (FastFind.au3).
11+
- [v1.8.3] : Bug fixes (FastFind.au3). Deleted
12+
- [v1.8.4] : Should now run on early XP and Windows 2000 OS.
13+
- [v2.0] : Documentation file in english (FastFind.chm), several new functions and new feature on some old functions.
14+
- [v2.1] : Bug fixes (errors in message boxes).
15+
- [v2.2] : Crashes + error messages (not gone in 2.1 ?!).

Credits.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FastFrench ([email protected]): Author of FastFind
2+
3+
Some parts and concept come from Chris Mallett ([email protected]), modified by [email protected]
4+
5+
CeramicWeasel : Help file in English for version 1.8 (FastFind.chm)
6+
Frank10 : Update 1.8.4 => 2.0 Autoit Wrapper
7+
8+
9+
AutoIt forum : http://www.autoitscript.com/forum/topic/126430-advanced-pixel-search-library/

FastFind-master/.gitattributes

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain

FastFind-master/.gitignore

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
#################
2+
## Eclipse
3+
#################
4+
5+
*.pydevproject
6+
.project
7+
.metadata
8+
bin/
9+
tmp/
10+
*.tmp
11+
*.bak
12+
*.swp
13+
*~.nib
14+
local.properties
15+
.classpath
16+
.settings/
17+
.loadpath
18+
19+
# External tool builders
20+
.externalToolBuilders/
21+
22+
# Locally stored "Eclipse launch configurations"
23+
*.launch
24+
25+
# CDT-specific
26+
.cproject
27+
28+
# PDT-specific
29+
.buildpath
30+
31+
32+
#################
33+
## Visual Studio
34+
#################
35+
36+
## Ignore Visual Studio temporary files, build results, and
37+
## files generated by popular Visual Studio add-ons.
38+
39+
# User-specific files
40+
*.suo
41+
*.user
42+
*.sln.docstates
43+
44+
# Build results
45+
[Dd]ebug/
46+
[Rr]elease/
47+
*_i.c
48+
*_p.c
49+
*.ilk
50+
*.meta
51+
*.obj
52+
*.pch
53+
*.pdb
54+
*.pgc
55+
*.pgd
56+
*.rsp
57+
*.sbr
58+
*.tlb
59+
*.tli
60+
*.tlh
61+
*.tmp
62+
*.vspscc
63+
.builds
64+
*.dotCover
65+
66+
## TODO: If you have NuGet Package Restore enabled, uncomment this
67+
#packages/
68+
69+
# Visual C++ cache files
70+
ipch/
71+
*.aps
72+
*.ncb
73+
*.opensdf
74+
*.sdf
75+
76+
# Visual Studio profiler
77+
*.psess
78+
*.vsp
79+
80+
# ReSharper is a .NET coding add-in
81+
_ReSharper*
82+
83+
# Installshield output folder
84+
[Ee]xpress
85+
86+
# DocProject is a documentation generator add-in
87+
DocProject/buildhelp/
88+
DocProject/Help/*.HxT
89+
DocProject/Help/*.HxC
90+
DocProject/Help/*.hhc
91+
DocProject/Help/*.hhk
92+
DocProject/Help/*.hhp
93+
DocProject/Help/Html2
94+
DocProject/Help/html
95+
96+
# Click-Once directory
97+
publish
98+
99+
# Others
100+
[Bb]in
101+
[Oo]bj
102+
sql
103+
TestResults
104+
*.Cache
105+
ClientBin
106+
stylecop.*
107+
~$*
108+
*.dbmdl
109+
Generated_Code #added for RIA/Silverlight projects
110+
111+
# Backup & report files from converting an old project file to a newer
112+
# Visual Studio version. Backup files are not needed, because we have git ;-)
113+
_UpgradeReport_Files/
114+
Backup*/
115+
UpgradeLog*.XML
116+
117+
118+
119+
############
120+
## Windows
121+
############
122+
123+
# Windows image file caches
124+
Thumbs.db
125+
126+
# Folder config file
127+
Desktop.ini
128+
129+
130+
#############
131+
## Python
132+
#############
133+
134+
*.py[co]
135+
136+
# Packages
137+
*.egg
138+
*.egg-info
139+
dist
140+
build
141+
eggs
142+
parts
143+
bin
144+
var
145+
sdist
146+
develop-eggs
147+
.installed.cfg
148+
149+
# Installer logs
150+
pip-log.txt
151+
152+
# Unit test / coverage reports
153+
.coverage
154+
.tox
155+
156+
#Translations
157+
*.mo
158+
159+
#Mr Developer
160+
.mr.developer.cfg
161+
162+
# Mac crap
163+
.DS_Store
164+
FFShowPixels1_7.zip
165+
TRACER.TXT
166+
FFShowPixels.txt
167+
FFColors.jpg

0 commit comments

Comments
 (0)