Re: Simulating a mouse right click
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 16, 2003
- 426 views
On Tue, 15 Jul 2003 20:56:05 +0100 (07/16/03 05:56:05) , Pete Lomax <petelomax at blueyonder.co.uk> wrote: > > > Derek, > I was just playing with the mouse routines. At the moment you have: > > global procedure clickPointerLeft() > w32Proc(xmouse_event,{6,0,0,0,0}) > end procedure > > and: > > global procedure dragPointerTo(sequence pos) > w32Proc(xmouse_event,{#2,0,0,0,0}) > w32Proc(xSetCursorPos,{pos[1],pos[2]}) > w32Proc(xmouse_event,{#4,0,0,0,0}) > end procedure > > I suggest adding the constants: > MOUSEEVENTF_LEFTDOWN = #0002, > MOUSEEVENTF_LEFTUP = #0004, > MOUSEEVENTF_RIGHTDOWN = #0008, > MOUSEEVENTF_RIGHTUP = #0010, > MOUSEEVENTF_MIDDLEDOWN = #0020, > MOUSEEVENTF_MIDDLEUP = #0040, > > (and possibly, but I'm not sure:) > MOUSEEVENTF_MOVE = #0001, > MOUSEEVENTF_WHEEL = #0800, > MOUSEEVENTF_ABSOLUTE = #8000, > > and also adding a more general purpose routine: > > global procedure clickPointer(object dwFlags) > if sequence(dwFlags) then dwFlags=or_all(dwFlags) end if > w32Proc(xmouse_event,{dwFlags,0,0,0,0}) > end procedure > > One catch is the msdn page states mouse_event has been superceded by > SendInput. > > What do you think? Seems like a useful and easy thing to do. Not in the next release though. Maybe the one after that. -- cheers, Derek Parnell