Guest TDBui Posted March 3, 2004 Share Posted March 3, 2004 Ok, the question is really basic....I have a box that popup and ask for the user name and password. How do I set focus on each box and enter my username and password. Thanks Link to comment Share on other sites More sharing options...
scriptkitty Posted March 3, 2004 Share Posted March 3, 2004 (edited) What you basically need is the Title of the box, that is easy to get with the included tool, AU3_Spy.exe It will show you what the Title is called. The line under: >>>>>>>>>>>>( Window Title )<<<<<<<<<<<<< Next you can have the script wait until this box apears, like this: WinWaitActive("WindowTitle") the next line you should have it place in your name and password. example: WinWaitActive("WindowTitle") send("myname{tab}mypassword{enter}") Most times, you type your name, then tab, then your password, then enter, and so I did it here. You can get more professional with ControlSetText ( "WindowTitle", "", "classnameNN", "myname" ) and such, but then you will need to mark down the classnameNN, this is found under this part with AutoItSpy: >>>>>>>>( Last Control Under Mouse )<<<<<<< This way is more reliable, and recomended when it can be used, however it is an advanced technique, and you will need to send your name, password, and use a control click to the right button. edit.. note, if you are doing this in some programs, (like explorer,) you will may need to have the mouse click on a set of coordinates. My use of Tab works for many programs, but not all forms use tab, or you may have to use more than one tab. Edited March 3, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Guest TDBui Posted March 3, 2004 Share Posted March 3, 2004 It work!!! Just need a little help starting but now I have manage to do a complete server load testing script. Thanks. Link to comment Share on other sites More sharing options...
CyberSlug Posted March 3, 2004 Share Posted March 3, 2004 One addendum to scriptkitty's post: Opt("SendKeyDelay",1) ;1 speeds things up WinWaitActive("WindowTitle") send("myname", 1") ;raw send("{tab}") send("mypassword", 1) ;raw send("{enter}") The '1' flag in the Send means to send the raw keystrokes. If your password contains any of '!#+^{}' then you should use this mode. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! 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