Sunday, January 30, 2011

AutoHotKey and Pandora

AutoHotKey is a scripting software for Windows... Wait... I should say a KICK ASS scripting software that basically allows you to control the PC the way you wanted :). YEIH!! Thank you to the authors (Chris Mallett and the rest of the team).

Anyhow, if I didn't touch the PC, Pandora would stop playing songs after 2 songs or so. After trying to debug this issue for a while (maybe I'll go back to it some day), I simply wrote a short script that tricks Pandora on me being there. Basically something that moves the mouse every 10 seconds or so. It works great!

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;    Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

while 1=1
{
Mousemove 0,0
Sleep, 10000
Mousemove 600,600
Sleep, 10000
}

Everything is actually so easy!! I think I'll donate something to those guys right now! I just love that spirit...

No comments:

Post a Comment