Search the Community
Showing results for tags 'follow line'.
-
I have a need to make the mouse push down the the left button and trace a shape that goes in all directions . If it can follow the line in a full circle I'd be set. I'm not concerned with the left mouse down, I have that figured out for later. My problem is having the cursor follow a circle in paint. It'll follow some but I think it's going toward 0,0 I'm guessing but falls off once it gets to a certain point. I've searched, I've tried several methods. This code below has been the simplest that works close but won't follow a full, or half circle. It just falls off. More detail that you need but if you've ever seen contour lines on a map, that's what I'm ultimately wanting to follow. I'll be doing it on my own images that I create by scanning the water with sonar and making lake maps. I want to put my image on google earth and turn the contour lines into paths so they have latitude longitude data. Tracing them manually is very time consuming and accuracy suffers. Thank you for any time you spend on this. It would be very helpful. HotKeySet("{ESC}", "Terminate") Const $color = 0x000000 Local $start = MouseGetPos() While 1 $pos = MouseGetPos() If $pos = $start Then ContinueLoop $pix = PixelSearch($pos[0] - 5, $pos[1] - 5, $pos[0] + 5, $pos[1] + 5, $color, 5) If @error = 1 Then ContinueLoop $start = $pos MouseMove($pix[0], $pix[1]) Wend Func Terminate() Exit EndFunc
- 33 replies
-
- pixelsearch
- pixelgetcolor
-
(and 1 more)
Tagged with: