Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slow Down User Controlled Mouse movement
Hi Gintaras,
I know that this is usually something controlled through the mouse drivers or window Control Panel --> Mouse settings but it's something I want to control in just one function.
I have a rep function that every 0.0001 seconds checks which child window the cursor is in and then selects all that are passes through by the mouse cursor. Problem is that if the user moves too fast, it doesn't pick up the one in the middle of three child windows. If I could only slow the user down then this would work. Any suggestions?
Thanks!!!!, Stuart

Copy      Help
int WinChild_0 = child(mouse)
int WinCid_0=GetWinId(WinChild_1)
int xmou_0=xm()
int ymou_0=ym()
int x_SeriesFrame_0 y_SeriesFrame_0 cx_SeriesFrame_0 cy_SeriesFrame_0; GetWinXY id(WinCid_0 win("Display" "#32770")) x_SeriesFrame_0 y_SeriesFrame_0 cx_SeriesFrame_0 cy_SeriesFrame_0;err    

rep 750
,int WinChild_1 = child(mouse)
,int WinCid_1=GetWinId(WinChild_1)
,if WinChild_1 != WinChild_0;
,,int xmou_1=xm()
,,int ymou_1=ym()
,,int x_SeriesFrame_1 y_SeriesFrame_1 cx_SeriesFrame_1 cy_SeriesFrame_1; GetWinXY id(WinCid_1 win("Display" "#32770")) x_SeriesFrame_1 y_SeriesFrame_1 cx_SeriesFrame_1 cy_SeriesFrame_1;err    
rep 3000
,int WinChild_2 = child(mouse);
,int WinCid_2=GetWinId(WinChild_2)

,if WinChild_2 != WinChild_1;;;LinkSeries
,,int x_SeriesFrame_2 y_SeriesFrame_2 cx_SeriesFrame_2 cy_SeriesFrame_2;        GetWinXY id(WinCid_2 win("Display" "#32770")) x_SeriesFrame_2 y_SeriesFrame_2 cx_SeriesFrame_2 cy_SeriesFrame_2;err
When it is important to track all mouse movement points, use hook, not rep. Search forum for SetWindowsHookEx.

Or look in MSDN, maybe function GetMouseMovePointsEx can be used here.

Forum Jump:

Users browsing this thread: 1 Guest(s)