Sign in to follow this  
Followers 0
apex52

Future Project Advice

5 posts in this topic

I need to write a script which will do the following:

Read the first line from a text file( a list of numbers 1 through 999) and put the number into another file on a specific line. It also needs to delete the line it just read so it will not duplicate the number entered. We run this educational software called CCC and it requires a unique station ID from 1 to 999. We currently have to modify the numbers by hand and after a year or two, we start duplicating numbers, it is especially irritating after we image a school. Can this be done in autoit or does anyone know of an easier way? :D

Share this post


Link to post
Share on other sites



Question:

On the first line of text containing numbers, how are they delimited? (Separated).

Clarification:

There is one line of numbers 1-999 (randomized?), you want to take a number (say, 372) and plug it into a spot (designated by what?) in another file (always same file?). Then you want just that number (372) removed from the origional file? Is there anything else in the origional file?

Share this post


Link to post
Share on other sites

The numbers will be on individual lines in sequential order in an answer file on the server. The number will plug into a specific line or possibly replace a specific line all together in a file located on the workstations. ( It is suppossed to say Station ID=XXX) Then the number needs to be removed from the answer file so it will not duplicate it on the workstations. The answer file will only contain the numbers. The workstations file, called environ.ccc has other pieces of info, but I can make sure each file is the same by snapshot.

Share this post


Link to post
Share on other sites

How exactly are you removing the line?


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

read the first line and insert into your other file

loop

read next line

write to temp file

endloop

rename temp file to first file name


----[ SandyD ]---

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