Tuesday, January 8, 2008

Macros, October 15, 2007

Continuing on, another entry from my "personal journals" dated October 15, 2007:

First off, I've become slowly addicted to computer macros via the awesome program AutoHotKey. It lets you create automation and hotkey based batch programs of incredible depth and versatility.

My first hands on experience with automation programs was earlier in the summer during an online contest I had joined. Using Automation Anywhere, a program for which I only had the demo, I was able to friend hundreds of voting members every hour to the point where I'm still by far the user with the most friends, and certainly helped me secure 2nd place in the competition. Even that program I found somewhat complicated, and it never performed exactly as I needed it to.

I vaguely recall Autohotkey back then also, but it was impossible to understand when I first loaded it up, and moved on.

The first automation program I ran was from a few weeks ago when I got WakeUpOnStandby, a freeware standalone program that woke my computer up from Hibernate at a predetermined time (8 am), so I could power down my computer overnight (helping fulfill my "Be Greener" New Year's Resolution), but be ready to roll as soon as I wake up. My computer had never been powered down so much, for so long, in forever.

The next program I used was Batchrun, which was simple in that it really only could run, close, and delete programs. My goal was to have it be able to singlehandedly close down all the processes that I needed closed whenever I should play a computer game (namely Team Fortress 2 and the rest of the Half Life Orange box when it arrived), and then another program to turn them all back on when I finished playing.

It worked well enough except some programs wouldn't close right, and, desperate, I turned back to Autohotkey.

Autohotkey was still very oblique when I powered it up, but somehow (I can't even remember it now), I figured out the intricacies of its interface (basically you just code it all in Notepad!), and found the code (and extra app PSKill) I needed to end the processes I wanted perfectly and quickly, and also open them back up.

Since then I've realized the possibilities this opened up for me. I tweaked the Open programs code to include resetting the color palette of my video card after I played. This was an annoying bug via my video drivers that I still haven't been able to fix, and I feel very empowered to have just written (okay, Autohotkey comes with an action recorder function much like Automation Anywhere that can duplicate all mouse and keyboard actions you choose) a code that will just do it for me very quickly.

I've even expanded the capabilities of WakeUpOnStandby so that I can run a script that turns the program on right before I put it on hibernate, so I don't have to keep it on at all times now so as not to risk having it inadvertently off when I put the computer on hibernate. This way I can save even more system resources by turning WOSB off also when I play my games.

But that's not all. I figured out how to get it to automate tedious internet tasks. I was annoyed when the online contest announced that voting was now enabled daily, which meant I would have to vote for myself daily if I wanted any chance at all of making it to the next rounds. So I set up a script to run that opens firefox, logs me in, and votes for me automatically. I set it to run in the morning after WOSB turns the computer back on, so unless I did it wrong (haven't tested it under real conditions yet), it should have done it before I wake up!

I tried to get it to load the aLiveJournal site up and click on the ranking sites and an add also, but it was having some problems I didn't have the time to fix. As soon as I figure that out, I'll have that run in the morning as well.

Then after that I'll set up another friending program for the contest, and then possibly a commenting program! Then I'd be unstoppable!

Now I get all overexcited just wondering what other things I can schedule for it to do (probably run defrag and autobackup)
As an epilogue, the second time I joined the contest, I ended up ranking 7th in the final round, versus the 2nd I did the second time around. Not bad for not asking help from friends, just AutoHotKey.

Related Posts by Categories

Widget by Hoctro | Jack Book

No comments: