bigassmuffin Posted September 5, 2006 Posted September 5, 2006 (edited) I am wanting to make a program (I jsut started, so nothing to really show) where it starts a pixel search once the mouse scroll is pressed. The one other problem I am going to have is I awnt the pixel search to be within 50 pixels of where the mouse scroll was clicked, from there I can do the rest. $color = hex color While 1 If Scroll Click Then $coord = PixelSearch( within 50 pixels of mouse click, $color, 10, 20 ) If IsArray($coord) = 1 Then MouseClick('right', $coord[0], $coord[1], 1, 0) Wend Somehtig like above, but clearly that doesnt work THANK YOU FOR YOUR TIME AND HELP! Edited September 5, 2006 by bigassmuffin
Moderators SmOke_N Posted September 5, 2006 Moderators Posted September 5, 2006 I am wanting to make a program (I jsut started, so nothing to really show) where it starts a pixel search once the mouse scroll is pressed.The one other problem I am going to have is I awnt the pixel search to be within 50 pixels of where the mouse scroll was clicked, from there I can do the rest.While 1 If Scroll Click ThenMouseGetPos() + 50? 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.
BigDod Posted September 5, 2006 Posted September 5, 2006 (edited) #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If _IsPressed("04", $dll) Then MsgBox(0,"_IsPressed", "Scroll wheel pressed") ExitLoop EndIf WEnd DllClose($dll) Edit - You can use MouseGetPos to get the mouse position Edited September 5, 2006 by BigDod 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
bigassmuffin Posted September 5, 2006 Author Posted September 5, 2006 (edited) wow, thanks for the fast replys, let me try this out and see how it goes, thanks ! edit: If _IsPressed("04", $dll) Then returns an error?? Edited September 5, 2006 by bigassmuffin
BigDod Posted September 5, 2006 Posted September 5, 2006 wow, thanks for the fast replys, let me try this out and see how it goes, thanks !edit: If _IsPressed("04", $dll) Thenreturns an error??Which version of AutoIt are you using, this needs latest release or Beta. 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
bigassmuffin Posted September 5, 2006 Author Posted September 5, 2006 i think mine is the laterst (not beta) its the version rite b4 they added the play sound function thing.. Oh..i have v3
GaryFrost Posted September 5, 2006 Posted September 5, 2006 i think mine is the laterst (not beta) its the version rite b4 they added the play sound function thing..Oh..i have v3v3.2.0.1 is the latest SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference. Â
bigassmuffin Posted September 5, 2006 Author Posted September 5, 2006 Alrgiht, thanks everyone, works great!
bigassmuffin Posted September 5, 2006 Author Posted September 5, 2006 One more quick thing: the coe is now this: $color = _ _ _ _ _ _ #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If _IsPressed("04", $dll) Then $coord = PixelSearch( 0, 0, 1023, 651, $color, 10, 20) If IsArray($coord) = 1 Then MouseClick('right', $coord[0], $coord[1], 1, 0) EndIf WEnd DllClose($dll) For the pixel search, I want it to search within an area of 50 pixels of when the scroll key was clicked, how do I do this? $coord = PixelSearch( 50 pixels around the click, $color, 10, 20) THANKS AGAIN FOR ALL YOUR TIME AND HELP!
Bundy Posted September 5, 2006 Posted September 5, 2006 $pos = MouseGetPos() $coord = PixelSearch($pos[0]-50, $pos[1]-50,$color, 10, 20)
bigassmuffin Posted September 5, 2006 Author Posted September 5, 2006 (edited) $pos = MouseGetPos() $coord = PixelSearch($pos[0]-50, $pos[1]-50,$color, 10, 20) $color = 0xA52C29 #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If _IsPressed("04", $dll) Then $pos = MouseGetPos() $coord = PixelSearch($pos[0]-50, $pos[1]-50,$color, 5, 2) If IsArray($coord) = 1 Then MouseClick('right', $coord[0], $coord[1], 1, 0) EndIf EndIf WEnd DllClose($dll) Does not work...? Edited September 5, 2006 by bigassmuffin
bigassmuffin Posted September 6, 2006 Author Posted September 6, 2006 I still need hep trying to use the pixel search within 50 pixels of the spot where I clicked using the scroller Thank you for your time and help
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