Sign in to follow this  
Followers 0
lolp1

Pixels & errors.

7 posts in this topic

Sorry for my multible post, but I am still learning some things.

When I try:

PixelSearch( 0, 0, 800, 600, 5922138 )
If Not @error Then
    Mouseclick("left", 566,263,1,0); 
Endif

if @error 
Mouseclick("left",372,401,1,0)
endif

It still performs both actions.

EG: It still clicks mouse at both locations, why?

Share this post


Link to post
Share on other sites



This is what I have:

PixelSearch( 0, 0, 800, 600, 5922138 )
If Not @error Then
    Sleep(750); 
    Mouseclick("left", 566,263,1,0);

Sleep(300); 
Mouseclick("left",372,401,1,0);

Else

Send("i");

Sleep(750); 
    Mouseclick("left", 566,263,1,0);

Sleep(300); 
Mouseclick("left",372,401,1,0);

But for some reason, it does not want to send i, or ir is just repeating the mouse clicks with out pressing Y, any idea?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

This is what I have:

PixelSearch( 0, 0, 800, 600, 5922138 )
If Not @error Then
    Sleep(750); 
    Mouseclick("left", 566,263,1,0);

Sleep(300); 
Mouseclick("left",372,401,1,0);

Else

Send("i");

Sleep(750); 
    Mouseclick("left", 566,263,1,0);

Sleep(300); 
Mouseclick("left",372,401,1,0);

But for some reason, it does not want to send i, or ir is just repeating the mouse clicks with out pressing Y, any idea?

1. What do you mean "pressing "Y""?

2. Isn't this the samething as you are trying to do?

PixelSearch( 0, 0, 800, 600, 5922138 )
If @error Then Send('i')
Sleep(750)
Mouseclick("left", 566,263,1,0);
Sleep(300);
Mouseclick("left",372,401,1,0);
If it never sends I, it's always finding the color. Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

What I'm trying to do:

Scan the area for the pixel, if the pixel is there perform the action.

If it is not, press the button (I) to open the pixel and then perform the action, this is what I tried to do this with:

PixelSearch( 0, 0, 800, 600, 5922138 )
If Not @error Then
    Sleep(750);
    Mouseclick("left", 566,263,1,0);

Sleep(300);
Mouseclick("left",372,401,1,0);

Else

Send("i");

Sleep(750);
    Mouseclick("left", 566,263,1,0);

Sleep(300);
Mouseclick("left",372,401,1,0);

Did I do something wrong?

Share this post


Link to post
Share on other sites

And "Send('i')" presses the "button" for you if you do it with the keyboard?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Yes, if I use just plain send("I") in Auto-it the pixel will show up.

Share this post


Link to post
Share on other sites

Yes, if I use just plain send("I") in Auto-it the pixel will show up.

You're so confusing... why don't you regroup and write out exactly what you want, and or provide some sensible information to help you.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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