Jump to content

Grabbing a field from a windows application as the submit button is pressed


Recommended Posts

I wrote an AutoIT program that acts as a Single Sign on for an application. Basically the user launches my script, I grab the username/password, plus 2 other fields for login, store it (encrypted) in an INI file and send the required information to the real login page. Second time it is run it skips the setup and just logs the user in.

The script is complete and working great, but passwords can change, (and must at least every quarter) so I also look for login errors and prompt the user for their new information. Is there a way to capture the information that the user types into the application right before they hit the send key so that I can update their single sign on? My goal is to prevent them having to type their password into the application as well as the autoit script every time a password changes.

I apologize if this is a noob question. I just started using autoit yesterday and I am not sure what direction to take on this feature. (i usually use vbscript)

Link to comment
Share on other sites

  • Developers

This application would need to have to use a keylogging method we don't want to see discussed in our forums.

Please read our forumrules which you can find at the right bottom corner.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

It seems to me that a method should exist without logging keys (sounds like that part isnt your issue) is this a web application or a windows application?

I think if its a windows application you might be able to create a tight loop that checks the status of the button, if its pressed or not, you would be very time limited however because i assume that once the button is depressed the gui with the information goes away

just a thought

edit: just reread title, my guess is this idea could possibly work, you'll have to sort through the related functions of getting the status of a control, i think it guictrlread(), ill play around and see if i figure something out.

also (again assuming you are already capturing the password/form data) why not monitor the data in a loop and then choose the final data based on when the gui disapears

Edited by JohnMC
Link to comment
Share on other sites

I also look for login errors and prompt the user for their new information.

Is there a way to capture the information that the user types into the application right before they hit the send key so that I can update their single sign on?

My goal is to prevent them having to type their password into the application as well as the autoit script every time a password changes.

Just a thought. It appears as if you are already checking for log on errors.

So why not display a prompt "from your script" requesting the new password.

Then when the user enters the new password you try again (or enter it into the application).

This way there is no need to monitor anything except for login errors.

It sounds to me like a much easier approach that monitoring, etc.

Have fun!

John Morrison

Link to comment
Share on other sites

I ended up just prompting the user to update their password once a successful login happens after a failure. I am going to look to see if I can reconfig it to pop up asking for an updated password and use that one to push to the application for a successful login.

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...