darkjedi Posted December 21, 2006 Posted December 21, 2006 I know that sound strange, but bear with me. I'm making an anti-AFK bot for World of Warcraft and I rondomly get disconnected sometimes. When this happens, all I have to do to get back online is type on my password and press enter two times. I was planning on just making a loop of thing to do, and I don't want my my password randomly typed while I'm AFK. The text box for the password doesn't seem to be it's own element, so is there a way to make it only type when I DC or something? Current code looks like this; CODEWinWaitActive("World of Warcraft") AutoItSetOption ("SendKeyDownDelay", 150) AutoItSetOption ("MouseClickDelay",0) While 1 Sleep(2000) WinWaitActive("World of Warcraft") MouseClick("right", 604, 427, 1,20) WinWaitActive("World of Warcraft") Sleep(2000) WinWaitActive("World of Warcraft") MouseClick("left", 215, 326, 1, 20) Sleep(2000) WinWaitActive("World of Warcraft") MouseClick("left", 262, 659, 1, 20) Sleep(2000) WinWaitActive("World of Warcraft") MouseClick("left", 557, 229, 1, 20) Sleep(2000) WinWaitActive("World of Warcraft") MouseClick("left", 638, 938, 1, 20) Sleep(2000) Send("{Enter}") Sleep(4000) Send("Password") Sleep(1000) Send("{ENTER}") Sleep(9000) Send("{ENTER}") Wend Func MyExit() Exit EndFunc
Thatsgreat2345 Posted December 21, 2006 Posted December 21, 2006 (edited) get the dimensions of the square and then use pixelsearch to search for the square then if its found pixelsearch will return the coordinates, do a mouse click on it and then send ur password Edited December 21, 2006 by Thatsgreat2345
darkjedi Posted December 21, 2006 Author Posted December 21, 2006 get the dimensions of the square and then use pixelsearch to search for the square then if its found pixelsearch will return the coordinates, do a mouse click on it and then send ur passwordNo I don't think I was clear.When I diconnect, the text box is active. I can start typing into it, which you can see in my script. but I want to only type when the box is there.Or I don't undertsand, I'm knew to AutoIT.
exodius Posted December 21, 2006 Posted December 21, 2006 Does the window have a specific title that you can do a WinExist check for?
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