AHK does have string functions. Quick example: <a href="http://pastebin.com/09kjNSvP" rel="nofollow">http://pastebin.com/09kjNSvP</a><p>(pads number with 0s at start so that it is 2 digits)<p>As for checking if the PIN was accepted, it'd maybe work to check the window title or something. Chances are it will change once the software is registered. Then you can easily log the current PIN and break the loop.<p>Not that I support piracy, just thinking of ways to clean up that code a bit.