joebob764 Posted February 3, 2009 Share Posted February 3, 2009 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 More sharing options...
Zedna Posted February 3, 2009 Share Posted February 3, 2009 Look at IE UDF Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
bundyxc Posted February 3, 2009 Share Posted February 3, 2009 Take a look at these two functions: _IEGetObjByName() _IEFormElementSetValue () Global $arr[2] $arr[0]="hip" $arr[1]="hip" ;^^ hip hip array. ^^ Link to comment Share on other sites More sharing options...
joebob764 Posted February 3, 2009 Author Share Posted February 3, 2009 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 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