Question:
which programming language do you recommend for this? to automate repetitive work in windows (see details)?
DrAnubis
2010-02-19 23:58:15 UTC
first of all, it should be as easy to learn as possible, since I don't have any programming experience.

it should be possible to create a program with it that has a graphical user interface.

The programs I would like to write would look like this for example:
In a folder with 100 .txt files, copy one line from each text file and put them all in one excel sheet.
or perform some calcultations with the data from the input files and create a new output file.
just simple things like that.
Four answers:
jplatt39
2010-02-20 01:14:43 UTC
I would tend to go with Python with ALL your choices. However, the first line, copy one line from each text file and put them all in one excel sheet is NOT a simple task. Also, creating a GUI even with something like Python or Tcl/Tk (an older cross-platform scripting language which creates GUIs ) is not always that simple either.



So, for a good python tutorial:



http://www.diveintopython.org



But of course one has to learn to crawl before one learns to walk. I STRONGLY advise learning how to use the command line and write Batch files:



http://www.computerhope.com/batch.htm



http://www.chebucto.ns.ca/~ak621/DOS/BatBasic.html



You will find it can be very powerful -- you could probably take one line from each text file and create a database file with it you can import into excel if you know what database format you are using. Back in the days of adventure games, I even played one which was nothing more than a batch file (it was also a satire on J. R. R. Tolkien's the Hobbit so by the end I was laughing too hard to care whether I "won" or not). It's definitely programming. It's one of the first ways many of us learned, and it is still powerful.



The TCL part of Tcl/Tk is based on Lisp so I don't recommend it for beginners. I have some reservations about recommending Python -- and for this I have a LOT of reservations about recommending Visual Basic. If you can afford to audit a class at a local community college I recommend going there and asking the faculty. Auditing usually costs about a hundred bucks plus textbooks. Again, ask them about what classes they offer, and what they can help you with. In drawing and programming I've always found however smart you are a teacher helps keep you honest and you will do better work with one. In this case, since you are the customer, don't cheat yourself.
2016-04-15 16:52:41 UTC
For a total newbie (to programming?) an interpreted language. BASIC was intended as an interpreted language and I believe REALBasic still offers that functionality (while Microsoft a.k.a GWBasic was GREAT for beginners Visual Basic isn't and has entirely different virtues). Python and Ruby are both excellent interpreted languages. I read about a Brazillian language in Dr. Dobb's yesterday called Lua, which was used in Baldur's Gate. I haven't had time to check it out yet but it sounds real interesting. Batch Files/Shell Scripting is a very powerful tool already on your computer which isn't talked about much any more. Pretty much any file which can be run from a command line can be run from a text file with executable privileges. In addition, you can declare variables in the OS space, and pipe output from programs to each other. In MS-DOS these have always had the file extension bat. In Unix/Linux they are called shell scripts, and can have any extension or none, but to execute them you must first use the command "chmod +x ". These have as much power and capability as any interpreted language. When I think about it, one of the things that drove me away from windows was the difficulty I was having accessing this sort of feature. The more Microsoft did for the consumer, the less freedom they allowed the power user. So if you haven't tried linux, try it. Knoppix is a live cd which loads a whole Linux OS into memory (and can run on as little as 385 megs of memory) from a CD. It's slower than an install but this was designed by a computer consultant for his work use. It has a pretty good desktop and lots of useful tools. You can boot it up and practice with obscure Unix tools like tar, grep, wc -- or just get information about them by typing "info" in a terminal or "man ". What you don't have to do is install it to your hard drive. If you happen to use Ubuntu, then I strongly recommend typing "sudo apt-get install build-essential" in a terminal and then investigating the GNU tools I listed above. It's not that I'm recommending Linux per se, but I am recommending you investigate and learn how to use the stuff it inherited from Unix, and try shell scripting there. If you like Windows, you will find tutorials on Batch files which will be easier once you've tried out the concepts in shell scripting where there is more support. I don't do much shell scripting, these days, but I do some, and I don't think I could have learned as much about programming as I have without it.
J.J.'s Advice / Avis de J.J.
2010-02-20 00:06:53 UTC
I think the best thing for you to do would be to learn Visual Basic. This is one of the simplest programming languages, and it's made by Microsoft. Because it's made by the same company as Windows, it's farily easy to interact between your program and the operating system.



Microsoft offers a free application called Visual Basic Studio that allows you to graphically create programs. This means that all you have to worry about in terms of actual coding is the logical calculations. The actual displaying of a GUI is done by Visual Studio. This is an advantage over other languages.



You can find a guide to getting started at http://msdn.microsoft.com/en-ca/vbasic/bb466159.aspx which includes links to download VB Studio, as well as beginner tutorials for programming in VB.



If you want to get more advanced, then you might want to learn C#, C++, C, Python, and/or Perl. All great languages.

C# (C-Sharp) is another Microsoft language. It's more complicated than VB, but some people prefer it. You can get info on that at http://msdn.microsoft.com/en-ca/vcsharp/dd919145.aspx
F*u*S*e*R
2010-02-20 00:00:04 UTC
Nothing better than Python to do that. Python is really easy to learn and use. And it's fun to use. It's the best language to use in repetitive work.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...