See the Wiki under Example Script Full

http://www.dual-boxing.com/wiki/index.php/AutoHotKey