Sign in to follow this  
Followers 0
Konan--M

NEW Pixelsearch

3 posts in this topic

#1 ·  Posted (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.... :lol:

I shortened the original pixelfunc.au3 (deleted all the functions i didn't need) and debuged it! :ph34r:

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)

EndFunc

I hope there are no bugs =P :lol: (u have to take the pixels from up-left, to down-right)

Edit: missed a word :D and the link ^^

Edited by Konan--M

Share this post


Link to post
Share on other sites



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 .....

Share this post


Link to post
Share on other sites

A question to the gosus in here...

Does the Function PixelChecksum() the same work as the script but 1000x times faster ? :ph34r:

- Ok I'm stupid =P

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0