-=HWD=- Posted August 28, 2006 Share Posted August 28, 2006 "$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 More sharing options...
BigDod Posted August 28, 2006 Share Posted August 28, 2006 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 More sharing options...
-=HWD=- Posted August 28, 2006 Author Share Posted August 28, 2006 ah ya i think it was thx~ sorry Link to comment Share on other sites More sharing options...
taurus905 Posted August 28, 2006 Share Posted August 28, 2006 "$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) EndIftaurus905 "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 More sharing options...
-=HWD=- Posted August 28, 2006 Author Share Posted August 28, 2006 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 More sharing options...
BigDod Posted August 28, 2006 Share Posted August 28, 2006 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 More sharing options...
-=HWD=- Posted August 28, 2006 Author Share Posted August 28, 2006 but doesnt this mean the whole area of the screen? "0,0,@DesktopWidth, @DesktopHeight" Link to comment Share on other sites More sharing options...
-=HWD=- Posted August 28, 2006 Author Share Posted August 28, 2006 i added in MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) but it still wont do anything... so weird >.< Link to comment Share on other sites More sharing options...
-=HWD=- Posted August 28, 2006 Author Share Posted August 28, 2006 is there something wrong with my find colour script? 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