lolp1 Posted September 25, 2006 Share Posted September 25, 2006 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? Link to comment Share on other sites More sharing options...
lolp1 Posted September 25, 2006 Author Share Posted September 25, 2006 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? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 25, 2006 Moderators Share Posted September 25, 2006 (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 September 25, 2006 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. Link to comment Share on other sites More sharing options...
lolp1 Posted September 25, 2006 Author Share Posted September 25, 2006 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? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 25, 2006 Moderators Share Posted September 25, 2006 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. Link to comment Share on other sites More sharing options...
lolp1 Posted September 25, 2006 Author Share Posted September 25, 2006 Yes, if I use just plain send("I") in Auto-it the pixel will show up. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 25, 2006 Moderators Share Posted September 25, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now