Noah Posted January 18, 2011 Posted January 18, 2011 hi guy, I need help. i have some problem to manipulate mousemove please read my code $x1 = 800 $y1 = 600 $x2 = 400 $y2 = 400 HotKeySet("{F2}","q") func q() mousemove($x2,$y2,100) EndFunc mousemove (0,0) mousemove($x1,$y1,100) in that case, from (0,0) it takes 3 seconds to get to ($x1,$y1), i want, when i press {F2} on 2 seconds it will move to ($x2,$y2) without stop in ($x1,$y1)firstly. its possible to make it? sorry for my bad english
somdcomputerguy Posted January 19, 2011 Posted January 19, 2011 (edited) This might work the way you want.. HotKeySet("{F2}","q") $x1 = 800 $y1 = 600 $x2 = 400 $y2 = 400 MouseMove (0,0) MouseMove($x1,$y1,100) While 1 Sleep(10) WEnd Func q() MouseMove($x2,$y2,100) EndFunc Edited January 19, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Noah Posted January 19, 2011 Author Posted January 19, 2011 @ somdcomputerguy thx somcdcomptuterguy but it same with my code.. i want it move without stop in ($x1,$y1)...
somdcomputerguy Posted January 19, 2011 Posted January 19, 2011 You mean not go to 800, 600 at all? If so, just comment that line or remove it.. To answer your next question, I mean this linemousemove($x1,$y1,100) - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Noah Posted January 19, 2011 Author Posted January 19, 2011 my program use the camera to catch/detect red color.. if my red color moving directly it will go on it. the red color sometime on 800,600 some time it on 400,400 for example firstly my mouse position on 0,0 then i drop red color on 800,600 -> mymouse moving on it before my mouse finish at 800,600 , I move red point on 400,400. in the fact my mouse will stop on 800,600 firstly before it go on 400,400 I want my script, when it is moving from 0,0 to 800,600 it can get interupt to move on 400,400. so it will not stop on 800,600
somdcomputerguy Posted January 19, 2011 Posted January 19, 2011 (edited) Sorry man, I'm very confused. I realize English is not your first language, and unfortunately in this case it is my only language. I can sometimes interpret someones meaning in a situation like this, but I surely can't do that here. So while I'll probably not be able to help you, perhaps someone else here can. Sorry again. Edited January 19, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
kylomas Posted January 19, 2011 Posted January 19, 2011 noah, say what you are trying to do in psuedo-code. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
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