Search the Community
Showing results for tags 'do until'.
Found 2 results
Hey, so after searching the Forums, Google, YouTube and Other Forums, I found ImageSearch! AnyBody Not Shure what ImageSearch is, it is a pixelsearch that looks for a image file in the ImageSearch.au3 directory and then Looks for it on the Screen Great Stuff ! Here is a Little Example where i Search for a .png #include <ImageSearch.au3> $x = 0 $y = 0 $res = _imagesearcharea("GreenYellow.png",1,340,150,940,512,$x,$y,100) If $res = 1 Then MouseMove($x,$y,100) Else MsgBox(0,"404","Not Found") EndIfJust a quick explain on what happens in the function _imagesearcharea: _imagesearcharea("GreenYellow.png",1,340,150,940,512,$x,$y,100) _imagesearcharea("image_name" , a*,b*,b*,b*,b*,c*,c*,d*) a* = Chooses the Return Value for C*. 0 = top x,y Pixel 1 = Center of the Found image. b* = Coordinates for the Search Window(Top,Left,Right,Bottom) c* = The Return Variables (See a*) d* = Variaton between Image and Search. I'm not sure if the explanation was needed, i just like pretty Topics My actual problem : I want to make a do_until loop that keeps doing _Imagesearcharea until i drag the desktop icon in the circa Area. I could do this by just specifying the Search window. But that would be way to Easy Instead i want the Loop to Run until the icon is dragged "near" a predefined spot on one axis using one of the Variables from _Imagesearcharea. So lets say i want to ImageSearch until i drag it near the middle of the Screen Seen from the X axis. Until $x = 640But that is not "Near" ! That is exact ! I want it to Do_Until it is "close" to 640, so it should also stop searching when it is +20 or -20 from 640. I think i will do this with some advanced Operators ? Math has never been my Strength... Please Help