Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: mouse drag script
:MouseMove ;all longs ;Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) ;I used mouse_event since the documentation says SendInput requires NT or win98 mouse_eventC = 2 ; ' Event contains mouse event record MOUSE_MOVED = 1 MOUSEEVENTF_ABSOLUTE = 32768 ;&H8000 ' absolute move MOUSEEVENTF_LEFTDOWN = 2 ;' left button down MOUSEEVENTF_LEFTUP = 4 ;' left button up MOUSEEVENTF_MIDDLEDOWN = 32 ;&H20 ' middle button down MOUSEEVENTF_MIDDLEUP = 64 ;&H40 ' middle button up MOUSEEVENTF_MOVE = 1 ;' mouse move MOUSEEVENTF_RIGHTDOWN = 8 ; ' right button down MOUSEEVENTF_RIGHTUP = 16 ;&H10 ' right button up dwData = 0 dwExtraInfo = 0 dllhnd2 = (StrCat(DirWindows(1),"user32.dll")) dwFlags = MouseEventF_Move | MouseEventF_Absolute result = DllCall(dllhnd2, long:"mouse_event", Long:dwFlags, Long:x1, Long:y1, Long:dwData, Long:dwExtraInfo) ;message("test", "") dwFlags = MouseEventF_Move | MouseEventF_LeftDown | MouseEventF_Absolute result = DllCall(dllhnd2, long:"mouse_event", Long:dwFlags, Long:x2, Long:y2, Long:dwData, Long:dwExtraInfo) ;message("test2", "") dwFlags = MouseEventF_LeftUp result = DllCall(dllhnd2, long:"mouse_event", Long:dwFlags, Long:x2, Long:y2, Long:dwData, Long:dwExtraInfo) RETURN
Article ID: W14627
Filename: Mouse Dragging by Script.txt
File Created: 2001:02:12:15:46:40
Last Updated: 2001:02:12:15:46:40