The mouse_event api fundtion is much easier to use than send input. I am not sure it works on all versions of windows, it works ok here on win2k.
Some dbpro code that does a click at 10,10.
mouse_click(10,10)
function mouse_click(x as integer, y as integer)
`clicks the mouse at x,y
load dll "user32.dll",1
call dll 1,"SetCursorPos",x,y
call dll 1,"mouse_event",0x2,0,0,0,0 : `leftmouse down
call dll 1,"mouse_event",0x4,0,0,0,0 : `leftmouse up
delete dll 1
`other values
`LEFTDOWN = 0x2
`LEFTUP = 0x4
`MIDDLEDOWN = 0x20
`MIDDLEUP = 0x40
`RIGHTDOWN = 0x8
`RIGHTUP = 0x10
endfunction
you ain't the cops