Konan--M Posted September 22, 2004 Share Posted September 22, 2004 (edited) I really liked the idea from non3's skript, but it was really too slow and i just wanted to search the current desktop on the same place for existing pixels (my idea was to identify a wc3 map automatically)! But this skript can also be used to look for a existing trayicon, or if u cannot use the WinActive option.... I shortened the original pixelfunc.au3 (deleted all the functions i didn't need) and debuged it! Then i added a funtion to compare a pixelfield - and it works great and very fast http://www.autoitscript.com/fileman/users/public/Konan/pixelfunc.au3 Example: #include "pixelfunc.au3" HotKeySet("^1","getPos1") HotKeySet("^2","getPos2") $fromx = -1 $fromy = -1 $tox = -1 $toy = -1 While 1 Sleep(100) IF $fromx<>-1 and $tox <> -1 Then ExitLoop Wend $file="test.txt" $file1 = $file $pixel=_Pixelfieldtofile($fromx, $fromy, $tox, $toy, $file) $sucess = _Pixelfieldcomparefiles($file1, $file1&".txt") if $sucess = 1 Then MsgBox(0,"Sucess", "Pixels found on desktop - written to file " & $file1) else MsgBox(0,"failed", "not able to find marked pixels on screen") EndIf Exit Func getPos1() $frompos = MouseGetPos() $fromx=$frompos[0]$fromy=$frompos[1] ;MsgBox(0,"Start position", "x: "&$fromx&" y: "&$fromy) EndFunc Func getPos2() $topos = MouseGetPos() $tox=$topos[0] $toy=$topos[1] ;MsgBox(0,"End position", "x: "&$tox&" y: "&$toy) EndFuncI hope there are no bugs =P (u have to take the pixels from up-left, to down-right) Edit: missed a word and the link ^^ Edited September 23, 2004 by Konan--M Link to comment Share on other sites More sharing options...
Konan--M Posted September 23, 2004 Author Share Posted September 23, 2004 Maybe someone could take the time to test the script or make some suggestions to make it better / faster ???´ The thought of the script is, that you write the data of a pixelfield to a file and afterwards u can see if the pixelfield is on the active screen ..... Link to comment Share on other sites More sharing options...
Konan--M Posted September 23, 2004 Author Share Posted September 23, 2004 A question to the gosus in here... Does the Function PixelChecksum() the same work as the script but 1000x times faster ? - Ok I'm stupid =P Link to comment Share on other sites More sharing options...
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