I just got an AIMTrak for my MAME cabinet, and I was going crazy because in MAME the crosshair would always go to the corner of the screen, rendering the gun useless. (It worked fine outside of MAME.)
I finally realized that it was because in the default.cfg or a specific game's CFG, there was:
<newseq type="increment">
...instead of:
<newseq type="standard">
I discovered this when comparing the CFG files generated by regular MAME64 (where the problem did not happen), vs the ones from MAMEUI64 (where the problem does happen). For some reason, MAMEUI sets that "increment" value for me instead of "standard". Maybe it's related to one of the numerous prefs I have set in MAMEUI, but after spending hours on this today I'm happy to have it working.
For anyone who may have that problem in a bunch of specific game CFG files, I found a nice free search utility called Agent Ransack that lets you search for strings in files, to get a list of all the CFG files with the word "increment".
Also, I was having a problem where MAME was seeing the 2 red gun buttons the same as the trigger, even though they work differently in Windows and are configured as right mouse button in the AIMTrak config app. I worked around that by just setting them as "GP Button 1" and "GP Button 2" in the config app, after which MAME recognizes them as unique buttons.