Jump to content
Sign in to follow this  
jrid06

HELPPPP!

Recommended Posts

jrid06

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.

Share this post


Link to post
Share on other sites
dbzfanatic

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

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
burners

yeah, how do we know he isnt using this to CRACK passwords


~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK

Share this post


Link to post
Share on other sites
qazwsx

@ dbzfanatic

;can it be?

For $n = A To Z

;instead of

For $n = 0 To 9999

no because "A" and "Z" are not numbers, the easiest way to do that would be to use the Chr() command.

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
dbzfanatic

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.

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  

×