How should i do things liek this?

  • Thread starter Thread starter pakmingki
  • Start date Start date
AI Thread Summary
The discussion centers on creating scripts or programs to automate tasks on a computer, particularly for organizing files and managing emails. The user seeks to develop a program that sorts cluttered desktop files into designated folders based on tags and another that extracts email information into a text document. Additionally, there is interest in automating email sending using predefined messages from a text file.Suggestions for programming languages include Tcl, which is noted for its ease of use and available resources, and Python, which is recommended for its simplicity in handling web-based tasks and email protocols. Visual Basic and VBScript are also proposed as viable options, especially for Windows users, due to their straightforward syntax and ability to run scripts without compilation. Batch files are mentioned for simpler file management tasks. The conversation highlights the importance of selecting the right tools based on the user's familiarity and the complexity of the tasks.
pakmingki
Messages
93
Reaction score
1
IM looking for a way to write programs, or maybe "script" is abetter word, to perform certain "chores" on my computer.

Let me give you a few examples.

My desktop is constantly cluttered with random ****.
Video files, text files, music files, html documents, etc ...

I want to write a program that when i execute it, it goes through my desktop, and puts all the files into certain folders i indicate.

And also, i want to organize many text files. Like, for school related ****, let's say i tag them with something liek "sr" which stands for school related.

So i change the file name of let's say "history essay.rtf" to "sr history essay.rtf" so when i run the program it puts tagged documents like that into a separate folder for school related stuff.

Another thing is, ts annoying for me to check my emails. I would like to write another program, so when i execute it, it goes into my email, copies the first 5 email messages and the sender, and pastes it into a text document, so instead of checking my email, i can simply execute a program and read emails in a text document.


Also, in relation to email ****, i would like to make another program that when i execute it, it reads a textfile containing email addresses, subject lines, and the actual message (which i would write myself), and sends the email off without me ever ahving to log into my email.

also, when i say "run" the programs, i want it to be so when i click it, one of those black command boxes comes up (liek when you open .bat things) just quit right after its done. So everything i want is done with one double click.

so, my question is, how would i go about making these types of programs or scripts or whatever the word is. I am not asking anyone to write these for me, just what would be the best languages to use.

I took computer programming 4 years ago in high school, and i was exposed to visual basic.

thanks.
 
Technology news on Phys.org
Tcl ("tickle") is a common scripting language. I've used it for production-level manufacturing test programs in the past. The learning curve is not bad, and there are lots of web resources to help out:

Free Download: http://tcl.activestate.com/software/tcltk/downloadnow83.html

Wiki for help: http://wiki.tcl.tk/

Others like Python better than Tcl (chroot especially). A quick google search should get you to Python download and help sites.

Have fun!
 
I don't even want to imagine how painful it would be write a web-browser or POP3 component in TCL. In fact, I wouldn't even bother trying.

In Python, you should be able to get a web-based email client running in a couple dozen lines using the mechanize module, or a POP3 client running in a couple dozen lines with the http://docs.python.org/lib/pop3-example.html module.

- Warren
 
Last edited by a moderator:
how about doing this in something like c++ or visual basic?
Cause i can get an educational copy of visual studio.net for 10 dollars at my high school.
 
Much of these tasks are simple enough that you're better off using simple VBScript, run through the Windows Scripting Host (if you're running Windows).

For example, create a file test.vbs with the following contents:
Code:
MsgBox "Hello World"

And double-click to run (no compiling required)...
There are plenty of samples on the web since VBS is used commonly by Network Admins for automation and logon scripts, etc.
Here's one for moving files:
http://www.computerperformance.co.uk/ezine/ezine36.htm

You can also use batch files for simpler tasks such as delete/create/move files, run programs, without a lot of logic (if statements, loops, etc)

For the email portion i suggest setting up an email program to get your email (i.e Microsoft Outlook) since it does exactly what you described.
 
FYI, you can get a beta release of Visual Studio codename Orcas (the coming VS release) for free from Microsoft, which, like Visual Studio 2005, is much superior to Visual Studio .NET and highly recommended.
You can also get free express editions of Visual C#, VB.NET... etc.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top