jabobian wrote:
I have a few problems when m_PenWidth is set to draw mouse trail.
What sort of problems?
Quote:
It seems the GDI+ part can not redraw the screen quite properly.
My script does not use GDI+ at all, and does not "redraw the screen". However, it does place a "transparent" window over the entire screen - sometimes the transparency doesn't work correctly (esp. with less powerful systems), but unfortunately that's out of my control. I had considered an alternative for such cases, but not implemented it due to lack of time and interest. I also posted it in your thread:
I wrote:
Rather than drawing to the screen, you could create an empty window with no caption or border, expand it to fill the screen, and draw onto it. The WM_ERASEBKGND message can be overridden via OnMessage to prevent the background colour from filling the window/screen.
That's basically what I already do, except that I allow the background to be painted and just make it transparent via
WinSet,Transparent. Sometimes the WM_ERASEBKGND method doesn't work - an alternative is to paint a snapshot of the screen onto the window when it is initially shown.
pajenn wrote:
1. Line 40 ("m_EnabledIcon = ") in the example Gestures_User.ahk effectively removes the tray icon on my computer.
That's the intended behaviour. I don't need to see when the script is enabled, only when it is not. Since I use
AHKControl, the tray menu is always accessible.
Please note that Gestures_User.ahk is intended to contain
your customizations, and should not be considered part of the main script. This is why it is not included in the ZIP.
Quote:
2. When the gesture key is pressed following a gesture the previous gestures trail briefly flashes on screen when trails are enabled,
This doesn't happen on my Windows 7 system. I noticed and fixed it on XP, but since I wasn't at home the script wasn't updated. I believe the fix was to find the following (which
already exists in the script):
Code:
; Clear the canvas before hiding it. Otherwise, the next time the window is shown,
; the previous gesture can be shown for a brief moment before the window updates.
VarSetCapacity(rect, 16, 0)
, NumPut(CYVirtualScreen + YVirtualScreen, NumPut(CXVirtualScreen + XVirtualScreen
, NumPut(YVirtualScreen, NumPut(XVirtualScreen, rect, 0))))
, DllCall("FillRect", "uint", hdc_canvas, "int", &rect, "uint", brush)
...and move it to G_ExitGesture:
Code:
if hdc_canvas ; Hide the mouse-trail canvas.
{
<insert code here>
Gui, Hide
}
I think I had originally written it this way, then moved it while attempting to resolve a similar, but intermittent issue.
Edit: I've updated the download with the change outlined above.