How should i do things liek this?

  • Thread starter Thread starter pakmingki
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 3K views
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.
 
Physics 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.