Hi,
Can I send a mouseclick?
Likeis for keys from your keyboard.....but how can I do this from the mouse?VB Code:
SendKeys "{Space}"
Thanks
Printable View
Hi,
Can I send a mouseclick?
Likeis for keys from your keyboard.....but how can I do this from the mouse?VB Code:
SendKeys "{Space}"
Thanks
you can call a control's click event like a subroutine. (maybe I should give you a goofy answer instead)
LOL
we don't need replies to the things that you don't know.
OK I'm really sorry......I was typing and meanwhile I thougt: "no, that's not the answer"
Sorry
Do you just want to send a click, or is there a target?
is it your program, or do you want to click on someone else's program? btw - You could just use {Enter} instead of a click.
Look into the mouse_event API, which will simulate a mouse click where ever the cursor is.
If you want to target a specific window, use the SendMessage API to send the WM_LBUTTONDOWN, and WM_LBUTTONUP messages.
I want to click in an other window.
Like: you press a button and 3 seconds later the mouse clicks one time, doesn't matter in what windows you are.
Two methods (as described in my earlier post).
Method 1)
-Use FindWindow to get the handle of the window
-If necessary, position the cursor via SetCursorPos
-Invoke the mouse_event() API to click the mouse
Method 2)
-Get the handle of window via FindWindow
-Send the WM_LBUTTONDOWN and WM_LBUTTONUP messages to it
hmmm......I think I am missing some files..........because I don't see one of that API's
Which one do you need?
I don't know. :( Thanks for your help, I'll call this trheat Resolved, it isn't but that doesn't matter anymore.
thnx
If you can get the declarations, this should do the trick
Code:handle = FindWindow("ClassName", "WindowTitle")
If Handle Then
PostMessage handle, WM_LBUTTONDOWN, MK_LBUTTON, 0
PostMessage handle, WM_LBUTTONUP, MK_LBUTTON, 0
End If
how do i make a program to click on specific coordinate x and y
I want to know that too!