I have both the cursor tracking and the forced tray problem on my Win7-64.
Some scientific facts:
Set-up: DF in full screen mode.
The cursor tracking is definitely working in all sub-modes like view, look, designate etc.
Right-clicking immediately sends DF to tray
Set-up: DF in windowed mode.
Cursor tracking does not work. Toggling tracking off and then on does not help. Reloading the script does not help. Reloading the game does not help.
Right-clicking is definitely working, all my new menu items are accessible and working as intended.
Field reports, difficult to reproduce:
Sometimes mouse-tracking works in windowed mode. I have seen it perhaps five or six times over the last few days. Most of the times I have no idea why it suddenly worked.
Twice I have seen it begin to work after clicking the button that resizes the DF window (the button between the minimize and close buttons in the top right corner of the windows frame). My window filled the whole screen, then I clicked the resize button (and had DF in a smaller than full size window), and immediately clicked it again for full screen, and suddenly mouse tracking worked. Another time I accidentally hit the resize button instead of the tray button and noticed that the window did a very slight adjust (indicating it was almost but not wholly full size before I clicked the button), and voila: Mouse-tracking. Unfortunately I have not been able to reproduce this.
Both times I later shifted to some other program that was open in the background (DFHack and Firefox resp.) and when I came back to DF, mouse tracking was irretrievably gone, no matter how much resizing I did.
Finding:
It is possible to go to full screen mode to benefit from the mouse tracking (to find a spot or a dorf or some interesting stone, fx), then push F11 to go to windowed mode to use the menu (select a building or a task), then push F11 again to go back to full screen mouse-tracking, (to place the building or designate the dig field).
This is a bit inconvenient as a work-around. And it is difficult to automate, because how can the script know that I intend to right-click (so as to press a virtual F11 before I do so) before I actually right-click, and then it is too late, because DF is in the tray?
Shukaro, how do you track the mouse? I tried to read the scripts, and I figured out that when first the script knows where the mouse is, it just uses virtual arrow-keys to get there. But how does it detect the position of the cursor? Is it measuring it from the top-left corner of the screen? And why does it detect this correctly (and every time!) in full-screen mode and not in windowed mode? The only difference I can think of is that the top-left corner has moved a little bit inward and a little bit more downward to free up space for the win7 window frame. Is this displacement the same across all screen sizes?
If this cannot be fixed for full screen DF, then so be it, I am biased here, always play in windowed mode. But I believe there must be a fix for windowed mode, because mouse-tracking has worked for me several times in that mode. I believe it is a question of customizing the script to allow for my screen size. Perhaps I am wrong, I am no programmer and all that.
STOP PRESS:
If I grab the DF window and move it slightly upwards and to the left, so that its top and left borders actually disappear out of the screen, then mouse tracking works. This is fully reproducible.