top of page

SCRIPTING & PROGRAMMING

I've found myself programming in many different languages for many different reasons. Trained at university in Pascal, C, Cobol, Java, Ada and Lingo, I've done professional programming in Java, Javascript, VB Script, and for a previous employer (Interact New Media) I was the company's main Lingo scripter - the scripting language used by Director.

I've also needed to learn a lot of things on the fly. Previous roles have required me to quickly learn the essentials of VB Script, Perl Scripts, and regular expressions, as well as working with other developer's code. The multimedia display for the 2001 SA Tourism Awards was one of my first projects working professionally with Lingo, and I had a relatively short time to adapt the previous year's project to display the most current award information.

I also do some casual programming for unusual personal projects, or even just because I have an idea I want to try out.

Below I've included a few scripts and tools I've built, both to show what I can do, and also because some of them might actually be useful!

Text Reverser

_______________

​

This is the simplest little Javascript toy you can imagine. It just takes any string you put in and reverses it. I've found it surprisingly handy.

The Obfuscator

_______________

​

Interested in making a block of text unreadable to anyone but a friend? This nifty little javascript tool takes a text password that you give it, and then encodes a block of text into gibberish – which can be decoded by anyone who has both the password and this tool.

It's not going to fool Russian hackers, or anyone with a genuine knowledge of cryptography. But it's still a nifty toy.

Just enter a password, enter some text into the top box, and click "Translate To" to get your gibberish. Put the same gibberish in the top box with the same password and click "Translate From" to get your gibberish back into text form.

The Stardater

_______________

​

This was for an online collaborative story-game I was involved in for a while – basically it converts our dates into the "Stardate" system used in the Star-trek TV shows and vice-versa. That's not that interesting to anyone not into Star-trek, but one interesting thing it does is taking a standard DD/MM/YYYY format date and converting it into a number that's basically "Thousandths of the year now completed".

So for example, 19/Mar/2380 05:22 is converted to "Stardate 57211.9", which means that date and time is 211.9 thousandths (or 21.19%) through the year. That's fun to know. It works the other way too, so if you've ever wondered about what date is 75% through the year, this will tell you it's 1/Oct/2380 17:31. or around 5:30pm on October 1st.

Box Request Form

_______________

​

This was a job I did for the Department of Environment many years ago. It was one of those "90% of the solution for 10% of the cost" projects – a workaround. My manager wanted an online form for departments to order records boxes (so they knew the right information would be included in the request). But rather wanting it done through the main IT department over several weeks (at a significant cost), she wanted it to cost nothing and be turned around in a few days.

So what she got was a Javascript form that generates a pre-formatted email with all the fields filled out - so they just needed to click "Send". It was a solution that kept everyone happy.

Assorted Scripts

_______________

​

The list below contains three sets of scripts (two VB Scripts and a pair of windows batch scripts) that have just been handy tools for me at some point. Feel free to download them and have a look.

I'm not aware of any bugs or reasons that they wouldn't work as stated, but they do modify files and are provided without guarantee - so use them on non backed-up files at your own risk.

 

  • Directory Lister Scripts These scripts are nothing ground breaking, but I've included them here because they're just super useful. You just double click on them to create a text-file list of the files in that directory. DirectLister.bat works on the current directory only, while SubdirectLister.bat works on the current directory and all sub directories.
     

  • Find/Replacer Script – This was developed for the department of environment, for a couple of projects where we just needed a few very specific keywords or phrases found and replaced in a large body of files. It takes a list of filenames and a list of words to be find/replaced, and swaps those words out in those files. Use with care (you'd never want to use it on a word like "and"), but very useful in the right circumstances.
     

  • Dynamic Shroud – This was something I did just out of interest, after talking with friends about being in foreign countries and security people going through the files on your computer. It's a quick-and-dirty way to hide a bunch of files in a certain folder - use the included scripts to generate a list of the files currently in the folder, and then run the "Shroud.bat" file to hide them - copying them to various sub-folders and changing their names so they're hard to find. Meaning it's basically witness protection for files.

bottom of page