lilandywandy Posted June 23, 2005 Share Posted June 23, 2005 While 1 If PixelGetColor(120,777) = Dec("7b7984") Then Sleep(500) Send("{F1}") Sleep(7000) Send("{F2}") Sleep(200) Send("{F1}") Sleep(7000) Send("{F2}") Send("{F2}") Sleep(200) Send("{F2}") EndIf If PixelGetColor(368,707) = Dec("00f742") Then Sleep(5000) Else MouseClick("right", 75,568, 1, 0) MouseClick("right", 119,568, 1, 0) MouseClick("right", 75,568, 1, 0) MouseClick("right", 119,568, 1, 0) MouseClick("right", 162,568, 1, 0) MouseClick("right", 193,568, 1, 0) MouseClick("right", 228,568, 1, 0) EndIf Wend Func mExit() Exit EndFunc for the part: If PixelGetColor(368,707) = Dec("00f742") Then Sleep(5000) how come it sleeps after the mouse clicks? how can i make it sleep right when 368,707 turns to 00f42 Link to comment Share on other sites More sharing options...
Guest Mike_NH Posted June 23, 2005 Share Posted June 23, 2005 i think this should work: If PixelGetColor(368,707) = Dec(0x00f742) Then Sleep(5000) ... Mike Link to comment Share on other sites More sharing options...
lilandywandy Posted June 23, 2005 Author Share Posted June 23, 2005 (edited) doesnt help =( Edited June 23, 2005 by lilandywandy Link to comment Share on other sites More sharing options...
buzz44 Posted June 24, 2005 Share Posted June 24, 2005 Because the colour isn't 0x00F742.. original question. qq Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 24, 2005 Moderators Share Posted June 24, 2005 Just curious, is the else statement supposed to be there? The way you have it it should read pixel color, and if it is true for the Dec() then sleep 5 seconds, but, you have the "Else" statement that says if it isn't true to do the mouseclicks. Are you wanting it to "MouseClick" when the "If" statement is true only? Otherwise it looks ok. See what you have is... a loop that continues to search for both "If" statements: If PixelGetColor(120,777) = Dec("7b7984") Then And If PixelGetColor(368,707) = Dec("00f742") Then Sleep(5000) It continues this until you stop it... so after the "mouseclicks it goes through the series again... and ultimately hits the correct pixel color to sleep(5000) for PixelGetColor(368,707) = Dec("00f742"). Hope this helps. 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