Jump to content
Sign in to follow this  
CantTouchThis

Colour Dection Help

Recommended Posts

Try and insert your code in coding tags so we cna read it easier =)

While 1
   If PixelSearch( 0, 0, 1240, 768, 0x637542 ) Then
      Send("{CTRLDOWN}")
      While PixelSearch( 0, 0, 1240, 768, 0x637542 )
        ;wait until the pixel dissapears
      WEnd
      Send("{CTRLUP}")
   EndIf
Wend

That should work fine, there must be something in

;wait until the pixel dissapears

please post that code =)


qq

Share this post


Link to post
Share on other sites

no lol its Xeongis code, i should have clarified that abit better so its NOT MINE! so im not sure what to put in the ;wait until the pixel disapears, thing cause there was nothing there when Xenogis gave me the code

Share this post


Link to post
Share on other sites

my bad lol, please post YOUR code and i can help you =) and if u want u can tell me exactly what you want it to do


qq

Share this post


Link to post
Share on other sites

lol. gah :) im not good at this explaing......i am using Xenogis code lol, i was just clarifying that it wasnt mine so, no one got mad at me :D

I want it to detect the pixel 0x637542 , then hold down ctrl or press it until the pixel disappears and for it to keep searching the pixel until it finds it again, then holds down ctrl or press it until it disappears again, i need it to loop forever :D

Share this post


Link to post
Share on other sites

ahhhhh. lol, i get you now =), np, it should still loop for ever but, once oyu have finished and it doesnt still loop post your code and i will help =).


qq

Share this post


Link to post
Share on other sites

While 1
If PixelSearch( 0, 0, 1240, 768, 0x637542 ) Then
      Send("{CTRLDOWN}")
      While PixelSearch( 0, 0, 1240, 768, 0x637542 )
      WEnd
      Send("{CTRLUP}")
Endif
Wend

That is it lol but it still doesnt loop i have read the Help File over and over but still i cannot work it out :) the script works one time around....then nothing.....:D

Share this post


Link to post
Share on other sites

ahhhh, whoops lol, it actually IS looping, but everything inside the while loop is an and if, its looping but the clour changes so it appears to do nothing

While 1
   If PixelSearch( 0, 0, 1240, 768, 0x637542 ) Then
      Send("{CTRLDOWN}")
; What is the use of the below loop
      While PixelSearch( 0, 0, 1240, 768, 0x637542 )
      WEnd
; What is the use of the above loop
      Send("{CTRLUP}")
   Endif
Wend

tell me what you want done cause there are many ways of doing this, and i think you might want somthing like

While PixelSearch( 0, 0, 1240, 768, 0x637542 ) <> 0x637542
Edited by burrup

qq

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...