CompWiz Posted January 11, 2007 Posted January 11, 2007 I thought this might be useful to some people so I'm posting it out here but I'm looking for any suggestions on how to make it faster. Currently it can go through one of my scripts that is about 2300 lines of code in about 34 sec. Does anyone know of a way to read a txt file into memory and then read it directly from memory insteaded of going line by line from file to file.Variable_list.au3
Moderators SmOke_N Posted January 11, 2007 Moderators Posted January 11, 2007 Seems like ALOT of un-needed work, and I only say that, because I have no idea what you are wanting to do specifically. 1. Are you just trying to pull all the variable names out of a script? 2. What exactly are you wanting to accomplish with this? 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.
Moderators SmOke_N Posted January 11, 2007 Moderators Posted January 11, 2007 I have a feeling I know why you want this since you didn't answer me. I managed to read the 61 Include Files / 26,989 Lines of code / and return 2787 unique variables in 26 seconds though. (1 or 2 of the includes are my own) 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.
CompWiz Posted January 11, 2007 Author Posted January 11, 2007 What my goal is with this file is to be able to sort through a script and pull out all variables. I think its useful because right now I'm working on a large script for some things at my job and when I'm done I have to put together a list of variables so that everyone who needs to change it can follow it. I mean I have comments all throughout the code but to me when I read through some elses code the hardest part is trying to learn the way they name all their variables. It may not be useful to some people but if your like me and you have several scripts that are exceding a 2000+ lines of code its a big help. The script runs pretty fast as it is but I'm mainly looking for a way that you can read a file into memory and then work on the file that way. Basicly the same way you can do in C++ and C#. If I can find a way to do this I maybe able to speed it up so that it could run in 5 sec or less. I've seen it done in C# and they read through over 2000 lines in about 2sec.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now