updated autohotkey for #307

Fixes the bug mentioned in issue #307 and a few other changes.