notakiller Posted April 3, 2006 Share Posted April 3, 2006 Is it possible to make like a "scan" with your mouse like all over the screen (so that i can use pixelcheksum ?) thx again guys Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 3, 2006 Share Posted April 3, 2006 (edited) u can just use pixelchecksum just define coordinates, it doesnt scan for a color under ur mouse unless ur like getting the coordinates of your mouse and like yeah.... $checksum = PixelChecksum(0,0, 50,50) While $checksum = PixelChecksum(0,0, 50, 50) Sleep(100) WEnd MsgBox(0, "", "Something in the region has changed!") Edited April 3, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 3, 2006 Moderators Share Posted April 3, 2006 (edited) While 1 Sleep(10) $Position_Color = _ColorUnderMouse() ToolTip('X-Coord = ' & $Position_Color[1] & @CRLF _ & 'Y-Coord = ' & $Position_Color[2] & @CRLF _ & 'Color = ' & $Position_Color[3]) WEnd Func _ColorUnderMouse() $OptPixMode = Opt('PixelCoordMode', 2) $OptMouseMode = Opt('MouseCoordMode', 2) Local $Mpos = MouseGetPos() Local $PixColor = '0x' & Hex(PixelGetColor($Mpos[0], $Mpos[1]), 6) Local $InfoReturn[4] $InfoReturn[1] = $Mpos[0] $InfoReturn[2] = $Mpos[1] $InfoReturn[3] = $PixColor Opt('PixelCoordMode', $OptPixMode) Opt('MouseCoordMode', $OptMouseMode) Return $InfoReturn EndFuncEdit: Forgot to reset my Coord Modes Edited April 3, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 3, 2006 Share Posted April 3, 2006 HA added a hotkeyset to quit what now mr hotkeyset("{esc}", "quit") While 1 Sleep(10) $Position_Color = _ColorUnderMouse() ToolTip('X-Coord = ' & $Position_Color[1] & @CRLF _ & 'Y-Coord = ' & $Position_Color[2] & @CRLF _ & 'Color = ' & $Position_Color[3]) WEnd Func _ColorUnderMouse() $OptPixMode = Opt('PixelCoordMode', 2) $OptMouseMode = Opt('MouseCoordMode', 2) Local $Mpos = MouseGetPos() Local $PixColor = '0x' & Hex(PixelGetColor($Mpos[0], $Mpos[1]), 6) Local $InfoReturn[4] $InfoReturn[1] = $Mpos[0] $InfoReturn[2] = $Mpos[1] $InfoReturn[3] = $PixColor Opt('PixelCoordMode', $OptPixMode) Opt('MouseCoordMode', $OptMouseMode) Return $InfoReturn EndFunc func quit() Exit endfunc Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 3, 2006 Moderators Share Posted April 3, 2006 !!.. how do you know he didn't already have one Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 3, 2006 Share Posted April 3, 2006 cuz im just good like that ok cant a man post b4 sum1 makes a completely new UDF to do such a simple task lol Link to comment Share on other sites More sharing options...
notakiller Posted April 3, 2006 Author Share Posted April 3, 2006 while 1 $coord = PixelSearch( 0, 0, 744, 479, 0x8C6042 ) If Not @error Then MouseMove($coord[0],$coord[1]) MouseDown("left") MouseUp("left") Sleep(500) MouseMove($coord[0]+40,$coord[1]+30) MouseDown("left") MouseUp("left") Sleep(11000) EndIf Wend whats wrong with that it does scan ... but find a black spot ... then does the rest >< and is the coord well written :S it is i dont get it ! ahhh so frustrating lmao thanks guys for the help Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 3, 2006 Moderators Share Posted April 3, 2006 Make sure you have the right color using AutoInfo.exe (Start >> AutoIt v3 >> Auto Window Info) Or (SciTe >> Tools >> AU3Info) or (C:\Program Files\AutoIt3\AU3Info.exe (Replace C: to whatever your hard drive is). Then look at this:Opt('PixelCoordMode', 2); look in the help file, you may need to change the 2 to 0 or 1 Opt('MouseCoordMode', 2); same as above, you'll know by how how you used AutoInfo Tool to get the coords While 1 $coord = PixelSearch(0, 0, 744, 479, 0x8C6042) If Not @error Then MouseClick('left', $coord[0], $coord[1]) Sleep(500) MouseClick('left', $coord[0]+40, $coord[1]+30) Sleep(11000) EndIf Sleep(10) WEnd Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
notakiller Posted April 3, 2006 Author Share Posted April 3, 2006 Make sure you have the right color using AutoInfo.exe (Start >> AutoIt v3 >> Auto Window Info) Or (SciTe >> Tools >> AU3Info) or (C:\Program Files\AutoIt3\AU3Info.exe (Replace C: to whatever your hard drive is). Then look at this:Opt('PixelCoordMode', 2); look in the help file, you may need to change the 2 to 0 or 1 Opt('MouseCoordMode', 2); same as above, you'll know by how how you used AutoInfo Tool to get the coords While 1 $coord = PixelSearch(0, 0, 744, 479, 0x8C6042) If Not @error Then MouseClick('left', $coord[0], $coord[1]) Sleep(500) MouseClick('left', $coord[0]+40, $coord[1]+30) Sleep(11000) EndIf Sleep(10) WEnd i get it to work thx to u ... your like my God dude lmao *bows* thanks alot i really appreciate it 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