Jump to content

Recommended Posts

Posted

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?

Posted

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?

  • Moderators
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

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.

Posted

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?

  • Moderators
Posted

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

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.

  • Moderators
Posted

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.

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...