Sign in to follow this  
Followers 0
Zim

A global username and password capture

3 posts in this topic

Hello,

I am seeking help in trying to capture a username and password field in a file that would allow me to paste the information into a different file. Let me try to explain the scenario a bit so it makes sense.

Introduced AutoIt to business, didn't really understand the potential so kind of ignored it at first. Made an automated report that would ask for username and password for the ODBC connection inside that script for a certain business unit, they loved it. They showed it to a different business unit, they loved it as well, so the whole process started to expand.

Now that I have one business unit requiring several different automation procedures built for their environment, I made a menu for them that will let them select which one's they want to run. However, I had to pull the username and password field out of each file since it would be repetitive and I only need it once.

I have played around with Clipget and Clipput but no go. I have a seperate executable script that asks for the username and password, but the second that script ends, it forgets the information and does not paste it any other files. How would I capture this information and keep it available globally for that user?

Here's what I was using inside the files originally and it worked great!

Global $User

Global $Pass

Global $MsgBoxOptions = 64 + 0

Global $Title = "Blah!"

; Input for username and password

$User = InputBox($Title, "Enter NT Username")

$Pass = InputBox($Title, "Enter NT Password", '', '*')

Then to paste it, I would just use the following....

WinWaitActive("Connect to DB2 Database")

Send("{Tab}")

Send($User)

Send("{Tab}")

Send($Pass)

Send("{ENTER}")

The above process worked great, but if I can write a script file called NTInfo.exe that can collect the username and password information, and be able to paste that information into, let's say, Report1.exe, 2.exe, 3.exe, 5.exe etc. etc, then how would I go about doing that?

Again, thanks for all your help guys!! I appreciate it.

Share this post


Link to post
Share on other sites



Collecting usernames and passwords is a shifty business.

While I'm not saying that I don't believe your story, i don't believe you will be getting much help capturing passwords. At least not in open forum.

If you find someone willing to help (I couldn't be much of one :)) you would be better off contacting them in PMs, for the answer to your question could probably be used in a less respectable way.

I'm not accusing you of anything, but i reccomend having people help you in PMs for this. You maybe can use this thread just to say "PM me if you think you can help"

Share this post


Link to post
Share on other sites

Alright then, thanks Paulie, I understand your concern and I do not mean any harm. I just want to make it easier for my non-coding peers to work on my code if I got hit by a bus tommorrow. Otherwise, it would be one script that performs all the tasks. I just have to break it down (as you can see from up above) so that it's easy to understand and follow.

Please PM me if you have an answer to my question and/or would be willing to help out.

Thanks!

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