Jump to content
Sign in to follow this  
DragoooN

Avoid errors which crash the program?

Recommended Posts

DragoooN

Hi there, when i got an error from PixelSearching and when its click the pixel.. If the pixel isn't exist that time its just come up and error.

I mean, how do i fix this? I want it only to do nothing if the error comes up instead of close the whole program.

I have also done this with Visual Basic .net and i think it should work with this too then? But how?

Share this post


Link to post
Share on other sites
furrycow

Hi there, when i got an error from PixelSearching and when its click the pixel.. If the pixel isn't exist that time its just come up and error.

I mean, how do i fix this? I want it only to do nothing if the error comes up instead of close the whole program.

I have also done this with Visual Basic .net and i think it should work with this too then? But how?

PixelSearch(...)
If @ERROR Then

;do nothing as you said

Else

;Do what you want it to do when it finds the pixel eg...

MouseClick(...)

EndIf
Edited by furrycow

Instant Lockerz Invite - www.instantlockerzinvite.co.uk

Share this post


Link to post
Share on other sites
TerarinK

Then do a @error clause in there, look at the PixelSearch in the lookup window. Now it isn't failing but your using what it equals, the two coordinates in a function then causing it to fail.

$aiNotError = PixelSearch()
If Not @error Then
    ;Do your function in here
EndIf

0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

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  

×

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.