Mysticdrew Posted October 9, 2016 Posted October 9, 2016 With windows 10 WindowsDesktopManager is integrated with the system. In windows 7 it could be disabled by turning off Aero. I do not know about windows 8 or 8.1 as I never used those versions. Now WDM causing massive slowness when doing pixel detection. For example the following code example: It's just verifying every other pixel in a 39x47 rectangle is black by checking it 8 times. Windows 10, takes 60.728 seconds to run. Windows 7, takes 0.2904 seconds to run. Hopefully this is the correct place to post this so the developers can address this issue for future releases! expandcollapse popup#include <Color.au3> $fileStringA = "0=0,0|0=2,0|0=4,0|0=6,0|0=8,0|0=10,0|0=12,0|0=14,0|0=16,0|0=18,0|0=20,0|0=22,0|0=24,0|0=26,0|0=28,0|0=30,0|0=32,0|0=34,0|0=36,0|0=38,0|0=0,2|0=2,2|0=4,2|0=6,2|0=8,2|0=10,2|0=12,2|0=14,2|0=16,2|0=18,2|0=20,2|0=22,2|0=24,2|0=26,2|0=28,2|0=30,2|0=32,2|0=34,2|0=36,2|0=38,2|0=0,4|0=2,4|0=4,4|0=6,4|0=8,4|0=10,4|0=12,4|0=14,4|0=16,4|0=18,4|0=20,4|0=22,4|0=24,4|0=26,4|0=28,4|0=30,4|0=32,4|0=34,4|0=36,4|0=38,4|0=0,6|0=2,6|0=4,6|0=6,6|0=8,6|0=10,6|0=12,6|0=14,6|0=16,6|0=18,6|0=20,6|0=22,6|0=24,6|0=26,6|0=28,6|0=30,6|0=32,6|0=34,6|0=36,6|0=38,6|0=0,8|0=2,8|0=4,8|0=6,8|0=8,8|0=10,8|0=12,8|0=14,8|0=16,8|0=18,8|0=20,8|0=22,8|0=24,8|0=26,8|0=28,8|0=30,8|0=32,8|0=34,8|0=36,8|0=38,8|0=0,10|0=2,10|0=4,10|0=6,10|0=8,10|0=10,10|0=12,10|0=14,10|0=16,10|0=18,10|0=20,10|0=22,10|0=24,10|0=26,10|0=28,10|0=30,10|0=32,10|0=34,10|0=36,10|0=38,10|0=0,12|0=2,12|0=4,12|0=6,12|0=8,12|0=10,12|0=12,12|0=14,12|0=16,12|0=18,12|0=20,12|0=22,12|0=24,12|0=26,12|0=28,12|0=30,12|0=32,12|0=34,12|0=36,12|0=38,12|0=0,14|0=2,14|0=4,14|0=6,14|0=8,14|0=10,14|0=12,14|0=14,14|0=16,14|0=18,14|0=20,14|0=22,14|0=24,14|0=26,14|0=28,14|0=30,14|0=32,14|0=34,14|0=36,14|0=38,14|0=0,16|0=2,16|0=4,16|0=6,16|0=8,16|0=10,16|0=12,16|0=14,16|0=16,16|0=18,16|0=20,16|0=22,16|0=24,16|0=26,16|0=28,16|0=30,16|0=32,16|0=34,16|0=36,16|0=38,16|0=0,18|0=2,18|0=4,18|0=6,18|0=8,18|0=10,18|0=12,18|0=14,18|0=16,18|0=18,18|0=20,18|0=22,18|0=24,18|0=26,18|0=28,18|0=30,18|0=32,18|0=34,18|0=36,18|0=38,18|0=0,20|0=2,20|0=4,20|0=6,20|0=8,20|0=10,20|0=12,20|0=14,20|0=16,20|0=18,20|0=20,20|0=22,20|0=24,20|0=26,20|0=28,20|0=30,20|0=32,20|0=34,20|0=36,20|0=38,20|0=0,22|0=2,22|0=4,22|0=6,22|0=8,22|0=10,22|0=12,22|0=14,22|0=16,22|0=18,22|0=20,22|0=22,22|0=24,22|0=26,22|0=28,22|0=30,22|0=32,22|0=34,22|0=36,22|0=38,22|0=0,24|0=2,24|0=4,24|0=6,24|0=8,24|0=10,24|0=12,24|0=14,24|0=16,24|0=18,24|0=20,24|0=22,24|0=24,24|0=26,24|0=28,24|0=30,24|0=32,24|0=34,24|0=36,24|0=38,24|0=0,26|0=2,26|0=4,26|0=6,26|0=8,26|0=10,26|0=12,26|0=14,26|0=16,26|0=18,26|0=20,26|0=22,26|0=24,26|0=26,26|0=28,26|0=30,26|0=32,26|0=34,26|0=36,26|0=38,26|0=0,28|0=2,28|0=4,28|0=6,28|0=8,28|0=10,28|0=12,28|0=14,28|0=16,28|0=18,28|0=20,28|0=22,28|0=24,28|0=26,28|0=28,28|0=30,28|0=32,28|0=34,28|0=36,28|0=38,28|0=0,30|0=2,30|0=4,30|0=6,30|0=8,30|0=10,30|0=12,30|0=14,30|0=16,30|0=18,30|0=20,30|0=22,30|0=24,30|0=26,30|0=28,30|0=30,30|0=32,30|0=34,30|0=36,30|0=38,30|0=0,32|0=2,32|0=4,32|0=6,32|0=8,32|0=10,32|0=12,32|0=14,32|0=16,32|0=18,32|0=20,32|0=22,32|0=24,32|0=26,32|0=28,32|0=30,32|0=32,32|0=34,32|0=36,32|0=38,32|0=0,34|0=2,34|0=4,34|0=6,34|0=8,34|0=10,34|0=12,34|0=14,34|0=16,34|0=18,34|0=20,34|0=22,34|0=24,34|0=26,34|0=28,34|0=30,34|0=32,34|0=34,34|0=36,34|0=38,34|0=0,36|0=2,36|0=4,36|0=6,36|0=8,36|0=10,36|0=12,36|0=14,36|0=16,36|0=18,36|0=20,36|0=22,36|0=24,36|0=26,36|0=28,36|0=30,36|0=32,36|0=34,36|0=36,36|0=38,36|0=0,38|0=2,38|0=4,38|0=6,38|0=8,38|0=10,38|0=12,38|0=14,38|0=16,38|0=18,38|0=20,38|0=22,38|0=24,38|0=26,38|0=28,38|0=30,38|0=32,38|0=34,38|0=36,38|0=38,38|0=0,40|0=2,40|0=4,40|0=6,40|0=8,40|0=10,40|0=12,40|0=14,40|0=16,40|0=18,40|0=20,40|0=22,40|0=24,40|0=26,40|0=28,40|0=30,40|0=32,40|0=34,40|0=36,40|0=38,40|0=0,42|0=2,42|0=4,42|0=6,42|0=8,42|0=10,42|0=12,42|0=14,42|0=16,42|0=18,42|0=20,42|0=22,42|0=24,42|0=26,42|0=28,42|0=30,42|0=32,42|0=34,42|0=36,42|0=38,42|0=0,44|0=2,44|0=4,44|0=6,44|0=8,44|0=10,44|0=12,44|0=14,44|0=16,44|0=18,44|0=20,44|0=22,44|0=24,44|0=26,44|0=28,44|0=30,44|0=32,44|0=34,44|0=36,44|0=38,44|0=0,46|0=2,46|0=4,46|0=6,46|0=8,46|0=10,46|0=12,46|0=14,46|0=16,46|0=18,46|0=20,46|0=22,46|0=24,46|0=26,46|0=28,46|0=30,46|0=32,46|0=34,46|0=36,46|0=38,46|" ConsoleWrite(isImageFromString($fileStringA,1, 1)) ConsoleWrite(isImageFromString($fileStringA,1, 1)) ConsoleWrite(isImageFromString($fileStringA,1, 1)) ConsoleWrite(isImageFromString($fileStringA,1, 1)) ConsoleWrite(isImageFromString($fileStringA,1, 1)) ConsoleWrite(isImageFromString($fileStringA,1, 1)) ConsoleWrite(isImageFromString($fileStringA,1, 1)) ConsoleWrite(isImageFromString($fileStringA,1, 1)) func isImageFromString($string, $x, $y) Local $colorList = StringSplit($string,"|") For $i = 1 to $colorList[0] -1 step +1 if colorFinder($colorList[$i], $x, $y) = False then return false endIf next return true endFunc Func loadImageFromFile($file) return FileRead($file) EndFunc Func colorFinder($string, $x, $y) Local $val = StringSplit($string, "=") Local $locVal = StringSplit($val[2], ",") Local $colorVal = $val[1] Local $xVal = $locVal[1] + $x Local $yVal = $locVal[2] + $y Local $color = PixelGetColor($xVal, $yVal) Local $highestRGB = findHighestPixelVal(_ColorGetRGB($color)) if $highestRGB = $colorVal Then Return True Else return false endIf EndFunc Func findHighestPixelVal($rgb) local $highest = 0 for $i = 0 to 2 step + 1 if $rgb[$i] > $highest Then $highest = $rgb[$i] endif next return $highest EndFunc Thanks! -Drew
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now