Sign in to follow this  
Followers 0
darkjedi

Typing into text boxes, but only if there is a text box.

4 posts in this topic

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;

CODE
WinWaitActive("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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Thatsgreat2345

Share this post


Link to post
Share on other sites

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

No 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.

Share this post


Link to post
Share on other sites

Does the window have a specific title that you can do a WinExist check for?

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