kredzio Posted May 29, 2009 Share Posted May 29, 2009 i use MouseMove to moving cursor. And need stoped it when cursor change color to red... I can't use pixel search because in screen I have much thats same colors, but only when cursor roll on that item, cursor is changing... I must use pixel search to find when cursor change color to red and stopping their moving... Link to comment Share on other sites More sharing options...
JackDinn Posted May 29, 2009 Share Posted May 29, 2009 see if MouseGetCursor () changes when it turns red if it does then you can use that. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
kredzio Posted May 29, 2009 Author Share Posted May 29, 2009 always MouseGetCursor gives me 0 because this isn't Windows cursor Link to comment Share on other sites More sharing options...
JackDinn Posted May 29, 2009 Share Posted May 29, 2009 (edited) kk what about , PixelGetColor (MouseGetPos (0),MouseGetPos (1)) EDIT:- opps Edited May 29, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
kredzio Posted May 29, 2009 Author Share Posted May 29, 2009 but this function starting when MouseMove has ended... I Need something for checking when MouseMove moving cursor... Link to comment Share on other sites More sharing options...
JackDinn Posted May 29, 2009 Share Posted May 29, 2009 hmm, well i dont know of a way to interrupt a mousemove command in progress but you could do the mousemove in a for next loop in short steps and do a pixel check in each step, if its done right it shouldn't be noticeable. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
kredzio Posted May 29, 2009 Author Share Posted May 29, 2009 (edited) this must be very short steps because this point is small, so this is not good idea Edited May 29, 2009 by kredzio Link to comment Share on other sites More sharing options...
JackDinn Posted May 29, 2009 Share Posted May 29, 2009 (edited) well how fast do you want the mouse to move ? but i believe you can do it ok MouseMoveEx(500,100) Exit Func MouseMoveEx($x,$y,$color=0) $step_devision=100 $start=MouseGetPos() $x_steps=($x-$start[0])/$step_devision $y_steps=($y-$start[1])/$step_devision For $count=1 To $step_devision MouseMove($start[0]+($x_steps*$count),$start[1]+($y_steps*$count),1) $color_check=PixelGetColor(MouseGetPos(0),MouseGetPos(1)) Next EndFunc this is set at mouse move speed 1 but if you change it to 0 then its fast and still checks the colour at each point, the steps are small enough to be as small as your mouse cursor is wide/high so should be ok but you can increase it as you like. also you might need to add or minus a little from the PixelGetColor(MouseGetPos(0),MouseGetPos(1)) MouseGetPos(0)+5 to get the point being checked in the middle of your cursor if you know what i mean. only thing is that im not sure if pixelgetcolor actually picks up the cursor color, but worth a try. Edited May 29, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 29, 2009 Share Posted May 29, 2009 im not sure if this is what you want... but to stop the mouse from moving use #Include <Misc.au3> _MouseTrap() [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
JackDinn Posted May 29, 2009 Share Posted May 29, 2009 (edited) o dear i found that trying to find a changing mouse cursor color with an ID return of 0 is an unsolved problem read herethere must be something else you can be checking for other than the mouse cursor color? Edited May 29, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Inverted Posted May 30, 2009 Share Posted May 30, 2009 Maybe have an Adlib to check the color a little to lower right of the cursor ? Link to comment Share on other sites More sharing options...
JackDinn Posted May 30, 2009 Share Posted May 30, 2009 well Adlib is a good idea , i didn't think of that 1 , nice a simple solution but still leaves the same problem of how to find the cursor color. i dont c how checking the color "a little to lower right of the cursor" makes any difference if you cant get something to return the color of the cursor then it dont mater where you are doing the check. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Inverted Posted May 30, 2009 Share Posted May 30, 2009 You're not looking for the cursor, you'll just be checking the pixel at the coordinates. Right ? Link to comment Share on other sites More sharing options...
JackDinn Posted May 30, 2009 Share Posted May 30, 2009 nop, the cursor color i use MouseMove to moving cursor. And need stoped it when cursor change color to red.thats the problem well not my problem but interesting that i cant find a way to do this. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Inverted Posted May 30, 2009 Share Posted May 30, 2009 (edited) You don't understand my reasoning. If you take a screenshot of the screen, the cursor will be visible, right ? Why wouldn't pixelgetcolor work ? Edited May 30, 2009 by Inverted Link to comment Share on other sites More sharing options...
JackDinn Posted May 30, 2009 Share Posted May 30, 2009 (edited) ahh right a screen shot, where did you say that, i missed it.yea that would work but you cant take a screen shot each few ms, well it might work but i kinda left that idea as overkill.but if it works for the chap all good stuff. its already been discussed and dismissed so im done on this one. http://www.autoitscript.com/forum/index.ph...hl=cursor+colorbut hope it works out ok for ya Kredzio Edited May 30, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
kredzio Posted May 30, 2009 Author Share Posted May 30, 2009 When i do screenshot cursor is visible because this isn't windows standard cursor. This is app cursor, so pixel searching i can do, but problem have with stopping mouse... I must try this function... Thanks JackDinn MouseMoveEx(500,100) Exit Func MouseMoveEx($x,$y,$color=0) $step_devision=100 $start=MouseGetPos() $x_steps=($x-$start[0])/$step_devision $y_steps=($y-$start[1])/$step_devision For $count=1 To $step_devision MouseMove($start[0]+($x_steps*$count),$start[1]+($y_steps*$count),1) $color_check=PixelGetColor(MouseGetPos(0),MouseGetPos(1)) Next EndFunc Link to comment Share on other sites More sharing options...
James Posted May 30, 2009 Share Posted May 30, 2009 _BlockInput()? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 30, 2009 Share Posted May 30, 2009 i already mentioned a similar funtion James..... but i guess the OP doesn't want the easy way out [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
JackDinn Posted May 30, 2009 Share Posted May 30, 2009 (edited) Please explain how to use BlockInput stop the mouse from moving ( during a MouseMove() movement ) if the mouse cursor changes color to red ? i use MouseMove to moving cursor. And need stoped it when cursor change color to red.from first post Edited May 30, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D 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