Jump to content

HELPPPP!


 Share

Recommended Posts

I am trying to write a script for users of my system that lost their password. It needs to click in the password box and type 0000 then click ok. If a screen that says "invalid password comes up then it needs to click ok and then type 0001 and so on until it gets to 9999. Any ideas on how to write this? I am obviously new at this.

Link to comment
Share on other sites

I am trying to write a script for users of my system that lost their password. It needs to click in the password box and type 0000 then click ok. If a screen that says "invalid password comes up then it needs to click ok and then type 0001 and so on until it gets to 9999. Any ideas on how to write this? I am obviously new at this.

Welcome to the forums ;). Quick bit of advice, try to make your titles a bit more explanatory than "help" and you'll get more responses from more knowlagable people. You should try using the Autoit WindowInfo tool to get the class name of the control you want it to type in the password for and since you're new I'll give you a bit of code to help you understand.

While 1
;use your own code here to check for the window
For $n = 0 To 9999
;use StringFormat here to add your 0s on the $n variable
ControlSetText() ;fill in the control info as defined in the helpfile
Send("{ENTER}")
;check for the error window and if the error is present then press ok
;if the error isn't present
ExitLoop
Next
MsgBox(48,"Password","Your new password is: " & $n)
WEnd

You'll notice I left out a lot of code where I commented. Most people in the forums will guide you in the right direction but not do everything for you, so look through the helpfile and good luck. :D

Link to comment
Share on other sites

  • Moderators

This subject needs no replies until the user can explain how/why they would have 10,000 possible passwords.

Edited 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

  • Moderators

You guys just don't get it do you.

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

This thread was closed earlier, I'm not sure who reopened it. I request the thread be closed and/or deleted. I showed a loop but left a lot of code out intentionally.

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