Sign in to follow this  
Followers 0
Guest TDBui

Newb Question

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

:whistle: It work!!! Just need a little help starting but now I have manage to do a complete server load testing script.

Thanks.

Share this post


Link to post
Share on other sites

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!

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