Jump to content

Help with This PixelSearch plz


Recommended Posts

"$coord = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 16777215)"

hmm i am trying to make the mouse to click on this colour "16777215" but it just pop up with errors~ plz help correct this statement for mez ty.

Func Go()

while 1

sleep(2000)

----> $coord = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 16777215) <-----

if not @error then

MouseClick("left", $coord[0], $coord[1], 1, 1)

EndIf

WEnd

EndFunc

Link to comment
Share on other sites

No error here, perhaps it is in the rest of your script.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

"$coord = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 16777215)"

hmm i am trying to make the mouse to click on this colour "16777215" but it just pop up with errors~ plz help correct this statement for mez ty.

Func Go()

while 1

sleep(2000)

----> $coord = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 16777215) <-----

if not @error then

MouseClick("left", $coord[0], $coord[1], 1, 1)

EndIf

WEnd

EndFunc

-=HWD=-,

Try this:

; Find first pure white pixel
$coord = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 16777215)
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
    MouseClick("left", $coord[0], $coord[1], 1, 1)
EndIf
taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

but it doesnt seems to be clicking on the colour >.<

i used this to find the colour and insert it into the pixel colour~ have i scripted anything wrong? ><

---------------------------------------------------------------------------------------

dim $a = MouseGetPos(), $var = PixelGetColor($a[0], $a[1])

while 1

sleep(100)

WEnd

Func Start()

while 1

MsgBox(64, "Colour of Content", $var)

WEnd

EndFunc

Func Stop()

while 1

Sleep(50)

WEnd

EndFunc

-----------------------------------------------------------------------------------------

Then i inputed the colour into here:

---------------------------

HotKeySet("!{f7}", "Go")

HotKeySet("!{f8}", "Stop")

while 1

sleep(100)

WEnd

Func Go()

while 1

sleep(2000)

------> $coord = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 3238597) <----

if not @error then

MouseClick("left", $coord[0], $coord[1], 1, 20)

EndIf

WEnd

EndFunc

Func Stop()

while 1

sleep(150)

WEnd

EndFunc

-----------------------------------------------------------------------------------------------

Link to comment
Share on other sites

Add a msgbox in before your MouseClick line and you will see where it is clicking. PixelSearch will find the first occurance of your colour starting left to right, top to bottom. You may have to restrict your search area.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...