Start Applications Remotely with Dropbox and Autohotkey





Update [June 1st, 9 am Brazil time (GMT-3)]: There's a follow-up post to this one with major updates to the idea below, thanks to all the great commenters on Lifehacker. Read the following post and continue to the major update post.


Update [May 26th, 4 pm Brazil time (GMT-3)]: This post has just been featured on Lifehacker, my favorite website of all times! Check out the post by Whitson Gordon at http://lifehacker.com/5547714/launch-applications-remotely-with-dropbox-and-autohotkey


This tutorial will use Autohotkey and Dropbox. If you don't use them, you really should.
The remote computer has to be a Windows -- your local OS doesn't really matter.
Tutorial by César Brasil, of http://brasildeluna.blogspot.com and http://twitter.com/brasildeluna
Click here to download the Autohotkey script mentioned below.

Last night, on a Sunday evening, I had a 700 Mb file to download, which I needed to bring to work this Monday morning. For many reasons, this not-so-huge file took several hours to download, instead of the 1-hour maximum I had first imagined. It actually took so long that when I woke up, 6 hours later, it was still about only 85% done.

'Well...' - I thought - 'No harm done. I'll just head to work, log into LogMeIn in a couple of hours, put that file in My Dropbox folder and thereyago!'. I can only imagine the look on my face when I realized I had closed LogMeIn earlier on Sunday to free up some RAM. Meanwhile, my PC was on at home with no one else there to help me out.

And so, in times of trouble, I came up with a very, very simple, how-didn't-anyone-think-of-this-before simple solution to start LogMeIn remotely. Not the best, I'm sure, but dead simple.

First, I coded an Autohotkey script such as this:

Loop
{
Sleep, 300000
Reload
}
Basically, all it does is reload itself every five minutes (5 x 60 seconds x 1000 milliseconds). However, if you add commands before the Loop, that means that in a maximum of 5 minutes the script will reload and perform that action. In the example below, I'm telling it to load LogMeIn.

Run, C:\Program Files\LogMeIn\x86\LogMeIn.exe

Loop
{
Sleep, 300000
Reload
}
A very important thing to remember is that you absolutely must remove this action after five minutes and save it again, thus overwriting the script, otherwise it will keep trying to open LogMeIn (or perform any action of your choosing) every five minutes, right after it reloads. Another option, and one I think is very practical, is just adding ';' before the command line. Autohotkey-savvy peeps know that it does not read anything after ';'. This way, you can keep a list of actions to run and just remove the ';' and save whenever you want it to take place. After five minutes (or the amount of time of your choosing) just place the ';' before that line once again and overwrite the file.

;Run, C:\Program Files\LogMeIn\x86\LogMeIn.exe
;Run, http://www.twitter.com/brasildeluna
;Run, F:\Dropbox\My Dropbox\makefilelist.bat
;Run, F:\Dropbox\My Dropbox\Note to mom.txt
;MsgBox, Mom, please call me right away, I forgot our home number again!

Loop
{
Sleep, 300000
Reload
}
Now, all you have to do is place this script into My Dropbox folder, and it will be on your home computer in no time.

Last, but certainly not least, the script must be placed on your remote computer's Startup folder, so that it will be up and running just as your PC is turned on. It will then reload all day long, every five minutes, without any actions assigned to it. That will make it completely available for you to make changes on the script remotely at any time and wait a maximum of 5 minutes for your action to take place.

Once again, do not forget to remove the action five minutes later, or at least put a ';' before the line, or else it will perform the action multiple times, including on your next start up.

Another very important thing is to not put 'Return' after your action, or the script may not reload again after.

There you go! Or as the French say, "Zèrre Hugo!"


For quite some time I've been hoping for an easy way to start an application remotely, without too much programming and no actual hacking. After lots of Googling, I eventually found a software that made me that promise, but it still wasn't a great one and crashed a lot. All in all, it just didn't do it for me.

This, for the time being, is good enough for me, and I hope it can aid at least a couple of strangers out there. If you are comfortable with creating batch files (*.bat) you could also place them on My Dropbox folder and use this script to make it run. The possibilities really are endless.

As you might have guessed, I ended up not retrieving that file from my home computer, since I couldn't start the script remotely, nor could I add it to the Startup folder without LogMeIn turned on. So, this time I'll have to wait till someone gets home. Next time, however, I shall master the universe! Or the remote PC at home, at least.

-César (brasildeluna)