Jump to content

How to Select Input Box


Recommended Posts

Hey,

I've been fiddling around with AutoIT recently to make a "helper" for an online game I play (Travian). Anyways, I've gone through the tuts in AutoIT 1-2-3 and the threads of people doing similar things and I'm stuck. Right now I have a script that uses my preset pixel coordinates to click around the screen, ultimately sending some troops. However, I'd like to have the script automatically select the correct input box so that it can the number of troops to send. I've looked at the source code and the input's name is "t1" but I can't figure out how to get my script to automatically move the cursor to that input and/or type into that box. Any help is appreciated, I know there are other scripts like mine but I enjoy the process of writing it myself.

Link to comment
Share on other sites

Hey,

Since I'm still pretty new to AutoIT (only done a few scripts, all of which only used simple key and mouse automations) it took me a bit to get the commands to work but I ended up using _IEFormGetObjByName , _IEFormElementGetObjByName , _IEFormElementSetValue. It works like a charm, funny to see how amazing it felt to just see a little digital "5" appear in a small form box. I'll use the same logic to select the other necessary things and send. Thanks for the help!

Link to comment
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
 Share

  • Recently Browsing   0 members

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