Sign in to follow this  
Followers 0
retromercial

Reading & Writing to Files?

2 posts in this topic

Hello,

I am trying to come up with an automatic install method for a program my company is deploying and I'm not sure how to accomplish what I want. I was hoping you could guide me in the right direction.

Basically the program requires a name, license key, and e-mail address in it's wizard for configuration. I would like to automate this as much as possible with AutoIt. Firstly, there will be a text file that contains all our license keys (110 of them), in a location accessible by all employees. What I would like is to have a file pushed to the employee that will include their name and e-mail address in it, let's say it's called info.txt. One line has their name, the next line their e-mail address.

The second file will be the list of keys. Let's call it keys.txt. What I want is for the script that's configuring this software to open this file, find an available license key and then mark the one it chose with a "plus sign" at the beginning so that the next time AutoIt opens the file, it knows to skip that particular key.

So, the file would have 110 keys, starting with let's say 1111, then 2222, then 3333... as it chooses 1111 it would change the file to say +1111 and then upon the next time AutoIt opens the file it skips +1111 and chooses 2222, then changes it to +2222, and so on.

Is something like this possible? Anyone want to throw some code snippets out?

Thanks so much!

Share this post


Link to post
Share on other sites



Welcome to Autoit Forums

What you want to do is possible. Generally we "help" people in these forums, not write code for them.

Please take a look at "Welcome to Autoit 1-2-3" in my signature below. It will help you get some code ideas together

8)


NEWHeader1.png

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