Silk

im new pleas fix my code

4 posts in this topic

#1 ·  Posted (edited)

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



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

1 person likes this

Share this post


Link to post
Share on other sites

its some game but please can it stay secret 

Share this post


Link to post
Share on other sites

@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.