ElementX Posted May 9, 2006 Share Posted May 9, 2006 hey all, I just started using Autoit and so far its a pretty cool app. My first project is trying to automate a simple install for a program called Zip Code Distance Wizard (http://www.pc-shareware.com/zipcodewiz.htm). I'm running into a problem with entering text into the registration form that launches at the end of the installation. I cannot seem to find any example scripts that enter text on a form and am having trouble finding the right command to make it work. I have a large group of computer-illiterate people in my dept. at work and automating even the simplest task would help. Any helpful hints would be much appreciated. I just cannot seem to get any of the fields to populate with the registration info. Its got fields for name, city, state, zipcode and registration code. I've attached a screenshot. Also, i've attached a screenshot of the Autoit Window info for the "Individual's name" field. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted May 9, 2006 Share Posted May 9, 2006 ControlSetText("Registration Form","","TEdit8","YOURTEST") you get one free one b4 we start saying read the help file but its nice that you actualy attched the contorl id and stuff Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 9, 2006 Moderators Share Posted May 9, 2006 hey all, I just started using Autoit and so far its a pretty cool app. My first project is trying to automate a simple install for a program called Zip Code Distance Wizard (http://www.pc-shareware.com/zipcodewiz.htm). I'm running into a problem with entering text into the registration form that launches at the end of the installation. I cannot seem to find any example scripts that enter text on a form and am having trouble finding the right command to make it work. I have a large group of computer-illiterate people in my dept. at work and automating even the simplest task would help. Any helpful hints would be much appreciated. I just cannot seem to get any of the fields to populate with the registration info. Its got fields for name, city, state, zipcode and registration code. I've attached a screenshot. Also, i've attached a screenshot of the Autoit Window info for the "Individual's name" field. Um , any code you have to go off of? 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...
ElementX Posted May 9, 2006 Author Share Posted May 9, 2006 Um , any code you have to go off of?Sorry, I was using everything thatsgreat2345 posted above EXCEPT I was trying to use ControlSend...that was my big mistake. Mine looked like this: ControlSend("Registration Form","Individual's name:","TEdit8","Test")thatsgreat2345, thanks for the help and pointing me in the right direction. I really appreciate it. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 9, 2006 Moderators Share Posted May 9, 2006 (edited) Sorry, I was using everything thatsgreat2345 posted above EXCEPT I was trying to use ControlSend...that was my big mistake. Mine looked like this: ControlSend("Registration Form","Individual's name:","TEdit8","Test") thatsgreat2345, thanks for the help and pointing me in the right direction. I really appreciate it.Your's should have worked if you took out the "Individual's name:", that "text" is the ControlID or ClassNameNN text... so let's say I have a button that the auotinfo tool says reads (**Under the ClassNameNN**) "Next", then I would doControlSend('Registration Form', 'Next', 'TEdit8', 'Text')That has to be perfect, because if any of that isn't true, then it won't send. Most will just leave the "Text" option blank like so:ControlSend('Registration Form', '', 'TEdit8', 'Text')If you try that, you might see it works, but ControlSetText is much quicker anyway. Edit: Typo Edited May 9, 2006 by SmOke_N 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...
ElementX Posted May 9, 2006 Author Share Posted May 9, 2006 Thanks SmOke_N. I just tried the code that you and thatsgreat2345 posted, but neither works. There seems to be something that is stopping/pausing my script when it gets to the registration page. Here's a screenshot of the registraton page (note its slightly different than the original one but code should be the same aside from title change. Last nite at home I had loaded the shareware version; here at work we have the real version). Here's the code I'm trying to use: ; Run the ZipeCodeDistanceWizard installer Run("ZipCodeDistanceWizard.exe") WinWaitActive("Welcome") Send("!N") WinWaitActive("Choose Destination Location") Send("!N") WinWaitActive("Select Program Manager Group") Send("!N") WinWaitActive("Installation Complete") Send("!F") WinWaitActive("Password unlock form") ControlSetText("Password unlock form", "Individual's name:", "TEdit9", "TESTING") When I execute the script, it gets past the installation but when the registration page comes up, the ControlSetText (or ControlSend) does nothing. I get the Autoit icon in my tasktray flashing to a red X to tell me the script is paused... So then I decided to change the ControlSetText command to a simple Send("!H") to hit the Help button on the Registration form, but that does not work either and causes the script to pause. Anyone have any ideas why I cannot control anything on the form? 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