Jump to content
Silk

im new pleas fix my code

Recommended Posts

Silk

i would like to script some code the idea is im red box im scanning box (x1,y1,x2,y2) for yellow pixel if i fined it then i click on it and do some other more jobs.

but if in box is not yellow dot i need to move 1 time to blue dot and start scanning box if there is not yellow dot next time i move to green dot  and so on this is my script  that not work.

Pleas what im doing wrong

HotKeySet("{f1}","myExit")
$i=0
$color = 0x1FFC90E
$x1 = 1159
$y1 = 170
$x2 = 1894
$y2 = 910



While(1)

   $Found = PixelSearch ($x1, $y1, $x2, $y2, $color, 5)
       if not @error Then
          ML($Found[0],$Found[1])
        
         Sleep(10000)
         ML(1872,842)
         Sleep(220000)
         ML(974,863)
         Sleep(5000)
         ML(991,834)
         Sleep(10000)
         $scan = True
      Else
         MR(1386,974)
         Sleep(2500)
         $Found = PixelSearch ($x1, $y1, $x2, $y2, $color, 5)
       if not @error Then
          ML($Found[0],$Found[1])
         Sleep(10000)
         ML(1872,842)
         Sleep(220000)
         ML(974,863)
         Sleep(5000)
         ML(991,834)
         Sleep(10000)
         EndIf

      EndIf


WEnd


Func MR($x,$y)
   MouseMove($x, $y,1)
   MouseDown("right")
   sleep(250)
   MouseUp("right")
EndFunc

Func ML($x,$y)
   MouseMove($x, $y,1)
   MouseDown("left")
   sleep(50)
   MouseUp("left")

   EndFunc


Func myExit()
   Exit
   EndFunc

Capture.JPG

Edited by Melba23
Added code tags

Share this post


Link to post
Share on other sites
AutoBert

What's the name/URL of the app, i (and i think everybody else also) need it to check the script against the app.

  • Like 1

Share this post


Link to post
Share on other sites
JLogan3o13

@Silk no it can't "stay secret". As I explained in your PM, this is against the forum rules, which I am guessing you know already based on your comment.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.