...{ kyle's stupid blog }...
Home | View List | Search<< Previous |  Next >>

Sunday January 28, 2007 (02:13pm)

Success!
(while watching Law & Order: SVU on my PC)


I did it! I FINALLY figured it out! I created a web-based remote control solution that allows me to wirelessly control my PC with my PDA!
 
 The solution I came up with is ingenious. I didn't even need any new software; I was able to do it with the help of three pieces of software I was already using, all of which are completely free: Apache web server, PHP, and AutoHotkey.
 
 First, you need to know that I was already running an AutoHotkey script on my computer, one that I wrote that enables me to use a video game controller to control computer functions like the mouse, keyboard, and various other programs. Anyway, the script is set up so that every 10 milliseconds it checks to see if there is movement from the joystick. So, what I did was simply add a line to the code that will also check to see if a certain filename exists on a network drive which is on my my web server. Then, I create a web page with PHP that will create a simple text file with the name of an AutoHotkey function in it (PHP is a web-based scripting language that runs scripts on the server-side rather than the client-side, which is instrumental in getting the web page to create the file on the web server and not the computer that's accessing the web server through a web browser). Then I tell AutoHotkey that if it finds that file on the network drive to read the function name inside it, delete the file, and then execute that function. So, by creating a web page that will dynamically create text files with AutoHotkey function names inside of them based on what I do on the web page (like click on a link, a button, or some text), I can wirelessly preform tasks such as powering the monitor off, skipping to the next song in Winamp, or muting the volume. I will primarily use this web page on my PDA, but since it's a web-based solution, it will work from ANY web browser that can access my website.
 
 Now before you get all excited about screwing with my computer from afar, let me just say that I've taken security precautions to avoid such incedents. First, I've password protected the folder in Apache, so you'd need to login in order to access the page (check for yourself: http://www.valquez.com/rc/). Second, even if you do access the page, it will only create the necessary file if your computers IP address matches the list of authorized addresses, which I'm almost certain of which yours does not. And finally, if you try to access the page too many times with no success one of those Trunk Monkey's comes over to your house and smacks you upside the head with a tennis racket. So trust me: Ain't nobody getting this page unless I want them too.
 
 So, yeah. This is pretty much what I've been working on these last few days. It was tough going for a while there but totally worth it in the end. I mean, writing the actual code and web pages was the easy part and the majority of that time was spent thinking up the hilarious Trunk Monkey joke, but you get the idea. Anyway, I'm out. Later,
 
 Kyle
 


home | view list | search << previous  |  next >>