Programming for software intermingling(?)

Started by
34 comments, last by lb2024 9 years, 10 months ago

Hello.

I'm not necessarily new to programming (in fact I've knew about gamedev for years now), but I'm not the best either.

But before going into too much details into me, I am wondering how to make a program open and gather information out of another program and insert data it into another one.

To be clear, I work gathering loads of data. I test cable lines and knowing the peak of lines, and distance is important. This data is saved as a ".dat" file and contains important information that is usually repeated throughout the testing process. What I want, is to retrieve certain elements of that file (peak, distance, etc) and create a file that can embed the information into Excel (or excel like workbook).

I also want to create a ".txt" file (manually using notepad) and have that imported into Excel (or an excel like workbook).

I also want the program to read file names (inside a folder) and check to see if I have all the files needed and if not which ones are missing or which ones are named incorrectly.

This is important to me because I'm spending days just compiling different lines but the same information into excel sheets, and if I could just make something that reads the file and insert them automatically that will save me so much time.

I don't intend to crack, alter, or do anything malicious to the software I'm reading, but I do want to be able to pull information out and place into another one.

I hope you guys can help me so I can save myself the headache of working night and day doing the same monotonous work. Thanks.

Advertisement

Well, the first thing you need to know is what the input data format looks like. The second thing is what you want the output data format to look like.

If you can specify the details of both of those, it should be pretty straightforward to write code to do the conversion automatically.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

It sounds like you need a script. It depends on the platform, but you can write a bash (on unix) or ar batch (on windows) file and do those things. You can check directories and files and then open or close other applications with the input and output needed.

Also, you can do those things with other less frustrating and flexible languages like Perl (Practical Extraction and Report Language), but I'm not sure how easy you can open other apps with that program (basically, you're creating a new process, and that is platform dependant).

If you wan't to write lines to an opened Excel file... I have no idea if that's possible.

I'm not sure how hard PEARL is to learn but will making a script allow me to operate other software and check parameters to make sure its correct before making a pdf and txt for example. And will PEARL allow checking a folder and the data filename one by one and check against a txt file to make sure all is there?

Other options? I appreciate the feedback. In a few days I'll go head first in whatever I need because this data train never stops lol.

In my opinion... don't bother learning a whole new language just because it might be 5% more efficient. If you already know how to program, just use what you know. Unless you're exclusively writing code for calculators, your language of choice almost certainly can do file I/O and basic data transformations. Use it.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]


Unless you're exclusively writing code for calculators, your language of choice almost certainly can do file I/O and basic data transformations. Use it.

My only caveat to that would be that if your language of choice happens to be C, C++ or their close relatives, and the file formats your are working with are text-based, then you may find that various other languages (Python, Perl, etc) are drastically simpler to perform text manipulations in.

However, if you are only implementing this once, then as ApochPiQ says, no point learning a whole new language.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Yeah, fair enough; I just object to the mentality that "oh you want to process data therefore THE ONLY RIGHTEOUS AND HOLY ANSWER IS FOO."

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Yeah, fair enough; I just object to the mentality that "oh you want to process data therefore THE ONLY RIGHTEOUS AND HOLY ANSWER IS FOO."

You clearly don't remember writing CGI scripts in ANSI C ;)

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Oh yes I do :-P

That's kinda my point, really; use what is good for the job, but weigh that against what tools you have immediately available.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Any good sites or resources to find out how to do what I need in c++(this one? )? What exactly is it called what im doing? (Scripts? ) I'm willing to do the leg work but I'm not quite sure the starting points.

This topic is closed to new replies.

Advertisement