Sign in to follow this  
Followers 0
Math2

PixelSearch Slower

7 posts in this topic

#1 ·  Posted (edited)

Here is part of the script:

While 1
Sleep(15)
$coord1 = PixelSearch(300, 641, 345, 685, 13816530, 16,)
If IsArray($coord1) = True Then
  Send("{a}")
EndIf
If IsArray($coord1) = True Then
  Send("{a down}")
EndIf
WEnd

But it is missing some "send key". Example, appears 2 and it only send one and miss the other. I think it is because I use vista, but I'm not sure. Is possible to optimize this script or I have to change the OS ?

Edited by Math2

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I see you send "{a}" then an Send("{a down}"). If you want your loop to run faster shorten your sleep statement. Of course you run the risk of increasing your processor overhead. Changing your OS won't make a difference seeing how you are viewing a virtual PC screen when doing your search.

Edited by MPH

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Did you suggest to me reduce the Sleep ? If yes, I had already tried reduce the sleep, it gets a little bit better, but continue missing. And before this numbers of the PixelSearch I tried more numbers and this was the best, but continue missing points, I think that is my processor, What do you think ?

Edited by Math2

Share this post


Link to post
Share on other sites

If IsArray($coord1) = True Then
  Send("{a}")
EndIf
If IsArray($coord1) = True Then
  Send("{a down}")
EndIf

It might run a bit more efficiently if you weren't checking to see if $coord1 were an array twice. You should be able to just do it once. Conditional statements tend to use more CPU.

If IsArray($coord1) = True Then
  Send("{a}")
  Send("{a down}")
EndIf

You might also condense it down to just one Send() statement.

If IsArray($coord1) = True Then Send("{a}{a down}")

Share this post


Link to post
Share on other sites

so ... my question is ... why are you pressing A ... and then holding it down? Do you have an {a up} later on in the script to cancel the hold-down?


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I solved the problem changing the color. But Thank you all. And

willichan works too, now to write is more easy, thank you.

Edited by Math2

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  
Followers 0