0

Lazy Automation: Ant Meets Autohotkey

Posted March 26th, 2009. Filed under Code

Ok. I’m lazy. Really lazy.

Today I got tired of having to click around in Eclipse to run my Ant tasks  and decided to automate it with a shortcut in Autohotkey:


!r::
Run, %comspec% /c ant -f D:\CFProjects\cares\extensions\ant\avrs.db.build.xml cleanlocal
return

Lets break this down:

  • So the !r:: simply tells Autohotkey to assign this shortcut to Alt+R.
  • Run, %comspec% /c is a shortcut to cmd.exe.
  • Then I simply pass the path of my Ant script and the task I want run (cleanlocal).

This script simply resets my database data back to a know state and I run this frequently when developing.  So now a quick Alt+R and I’m done!

Possibly Related:

If you have enjoyed this entry. Please feel free to bookmark it using your favorite social bookmarking site

Leave a Comment