You have a script, using what scripting language?

There should be one in the AHK sticky.