Thanks for that. I don't know much about the desktop coordinates issue, but I seem to remember it's a quirk of the OS. Offhand, I don't know how to fix it.
But I post my actual [macro recorder] code here.
There will be some rework in keyboard-handling, but mouse should be finished.
For testing please click modifiers (inclusive mouse) minimum 50ms
I'll present a new version after weekend..
Also, there may be some things for a macro recorder that can never be done properly in a script (since AutoHotkey isn't designed to make scripts that are themselves macro recorders). So if you find anything like that, perhaps the recorder can be redesigned by you or someone else to use the hook DLL someone mentioned in another topic.