Analog thoughts in a digital world

Main menu

Tag Archives: scripting

I have been trying to come up with the best way to start this blog. I have debated writing a post about why I am doing this blog, what it will be about, Resistentialism, me, etc. In the end I decided to share a share a stupid little scripting project I have been playing around with to help set the serious tone I believe this blog deserves.

I’ve been getting back into scripting lately since changing jobs. I have not needed todo all that much scripting in the past few years because I was in more of leadership role. Now I get to write scripts again, I am remember how much fun it is.

Back in the day, I stumbled upon a little script/program called the “Illuminator” that Steve Jackson Games was using to generate random, er, I mean coded, message from the “illuminated masters” of the Illuminati. I build something like it use a data file back then using VB 6.0 that I gave to SJG. (It was more or less useless to them considering that they are a Mac/Linux shop or at least were.) And now I use it as a way to learn various parts of new scripting languages when I need to. (I learn best “hands on”, and having a nice repeatable and expandable project to use for that makes things easier.) The project itself general requires using arrays, random numbers, files (writing to and reading from), and user input. (This example does not read from any files, but I am working on an expanded version that will. I will share that when it is complete. I also plan to write a Python version and possibly a Lua version as well.)

In the past, I would just generate random silly messages, but with the viral nature of Cave Johnson’s “Rue the day” speech from Portal 2, I decided to use that is the base message framework. If you have not played Portal 2 or hear of Cave Johnson, watch is video, thing will make a little more sense afterward:

Okay, with all that being said here is my silly little PowerShell “Rue the day” speech/message generator: (It has been testing with PowerShell 2 on Windows 7 64-bit)

Alright, I’ve been thinking. When Russia gives you undercooked pizza, don’t send it back. Make Russia take the undercooked pizza back! Get mad! I don’t want your damn undercooked pizza! What am I supposed to do with these?! Demand to see Russia manager! Make Russia rue the day it though it could give Merlin undercooked pizza! Do you know who I am? I’m the wizard who’s gonna burn your capitol building down! With undercooked pizza! I’m going to get my mages to invent a combustible undercooked pizza that burns your house down!