Does anyone have any idea? Workaround, hints, etc...
I tried using PostMessage() but that does not seem to work.
--maciej
Printable View
Does anyone have any idea? Workaround, hints, etc...
I tried using PostMessage() but that does not seem to work.
--maciej
Use the Mouse_Event API, ie.
private Declare Sub mouse_event Lib "user32" (byval dwFlags as Long, byval dx as Long, byval dy as Long, byval cButtons as Long, byval dwExtraInfo as Long)
private Const MOUSEEVENTF_LEFTDOWN = &H2
private Const MOUSEEVENTF_LEFTUP = &H4
private Sub Command1_Click()
Call mouse_event(MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
First get the handle for the object you want to click. You can use functions like "findwindow", "getwindow"... ONce you get the window, use the API "sendmessage". Here is an example:
call sendmessage(buttonhWnd%, WM_LBUTTONDOWN, 0&, 0&)
call sendmessage(buttonhWnd%, WM_LBUTTONUP, 0&, 0&)
that should click an object. hope it helped!
-Will [email protected]