Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

PostMessage not working in a window


  • Please log in to reply
8 replies to this topic
OSRichard
  • Members
  • 7 posts
  • Last active: Jan 27 2010 06:18 AM
  • Joined: 26 Sep 2009
Hi.

I have an application that tries to send a mouse click using messages WM_LBUTTONDOWN and WM_LBUTTONUP with PostMessage function.

Here is a capture I made with uuSpy (I'm on Vista, with Aero on):

Start:
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000000]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000000]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000000]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000000]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02bd03cc]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000012]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02bd03cc]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_NCMOUSEMOVE,160], wParam:[0x00000012], lParam:[0x02bd03cc]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02b903cf]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,32770], wParam:[0x00000000], lParam:[0x021502c6]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x021502c6]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_NCMOUSELEAVE,674], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[UnKnown,32777], wParam:[0x00000000], lParam:[0x0c2d6a70]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02ab03da]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02ab03da]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x020702d1]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02a203df]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02a203df]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01fe02d6]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029703e6]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029703e6]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01f302dd]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01f502da]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[WM_MOUSEACTIVATE,33], wParam:[0x000e0816], lParam:[0x02010001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_WINDOWPOSCHANGING,70], wParam:[0x00000000], lParam:[0x0c4cf8c4]
WH_CALLWNDPROC:[WM_WINDOWPOSCHANGED,71], wParam:[0x00000000], lParam:[0x0c4cf8c4]
WH_CALLWNDPROC:[WM_ACTIVATEAPP,28], wParam:[0x00000001], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCACTIVATE,134], wParam:[0x00000001], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_ACTIVATE,6], wParam:[0x00000002], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02010001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
[b]WH_GETMESSAGE:[WM_LBUTTONDOWN,513], wParam:[0x00000001], lParam:[0x01f502da][/b]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000001], lParam:[0x01f502da]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
[b]WH_GETMESSAGE:[WM_LBUTTONUP,514], wParam:[0x00000000], lParam:[0x01f502da][/b]
WH_CALLWNDPROC:[WM_CAPTURECHANGED,533], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01f502da]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029903e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029703e3]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x029703e3]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01f302da]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x000e0816], lParam:[0x02000000]
WH_CALLWNDPROC:[UnKnown,32771], wParam:[0x00000000], lParam:[0x01f5032e]
WH_CALLWNDPROC:[WM_ACTIVATEAPP,28], wParam:[0x00000000], lParam:[0x00000a54]
WH_CALLWNDPROC:[WM_KILLFOCUS,8], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_IME_SETCONTEXT,641], wParam:[0x00000000], lParam:[0xc000000f]

What I tried in my code is this:

PostMessage, 0x201, 0x00000001 , 0x01f502da, , ahk_id%table_id% ;WM_LBUTTONDOWN
   PostMessage, 0x202, 0x00000000 , 0x01f502da, , ahk_id%table_id% ;WM_LBUTTONUP

This does not work for this particular window. Do I need to send other messages from the captured ones to make this work? If so, which?

Note: I also tried with ControlClick, and that didn't work. Also, this window has no controls.

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
PostMessage, 0x201, 0x00000001 , 0x01f502da, , [color=red]ahk_id %table_id%[/color] ; don't forget the space between 'ahk_id' and the window handle
   PostMessage, 0x202, 0x00000000 , 0x01f502da, , [color=red]ahk_id %table_id%[/color]

You don't really need to worry about the wParam, lParam is the most vital component.

And you don't even have to retrieve the hex code for the mouse's coordinates, I created a function (others here have done so as well) that will click at the coordinates provided:

PostClick(x,y,win="A") { ; assumes 'win' is the active window if no window title is specified

  lParam := x & 0xFFFF | (y & 0xFFFF) << 16
  PostMessage, 0x201, , % lParam, , % win ;WM_LBUTTONDOWN
  PostMessage, 0x202, , % lParam, , % win ;WM_LBUTTONUP
 
}

P.S. Note that in the thread I linked to Lexikos rightly points out that my function is simply a less powerful version of ControlClick.

The drawback to the function is that given the way that you're specifying the window title you'll have to use an extra variable to pass it to the function:

!j::
[color=red]current=ahk_id %table_id%[/color]
PostClick(375,400,[color=red]current[/color])
return

PostClick(x,y,win="A") {

  lParam := x & 0xFFFF | (y & 0xFFFF) << 16
  PostMessage, 0x201, , % lParam, , % win ;WM_LBUTTONDOWN
  PostMessage, 0x202, , % lParam, ,  % win ;WM_LBUTTONUP
 
}


OSRichard
  • Members
  • 7 posts
  • Last active: Jan 27 2010 06:18 AM
  • Joined: 26 Sep 2009
Sinkfaze, thanks for your reply.

I tried your suggestions, but had the same result as before. Here is the uuSpy capture:

WH_GETMESSAGE:[WM_LBUTTONDOWN,513], wParam:[0x00000001], lParam:[0x01f6017f]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_LBUTTONUP,514], wParam:[0x00000000], lParam:[0x01f6017f]
WH_CALLWNDPROC:[WM_CAPTURECHANGED,533], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[UnKnown,32777], wParam:[0x00000000], lParam:[0x0f1023a0]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[UnKnown,32777], wParam:[0x00000000], lParam:[0x0f102080]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x001709f4], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,32770], wParam:[0x00000000], lParam:[0x01df017c]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01df017c]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_SYSKEYUP,261], wParam:[0x00000079], lParam:[0x80440001]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x001709f4], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01df017c]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[UnKnown,32777], wParam:[0x00000000], lParam:[0x0f102080]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02470329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02480329]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x001709f4], lParam:[0x02000001]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02480329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02480329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02490329]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x001709f4], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02490329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01e1017c]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02520329]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x001709f4], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x02520329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01ea017c]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x001709f4], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x025f0329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01f7017c]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x025f0329]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x001709f4], lParam:[0x02010001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x025f0329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_LBUTTONDOWN,513], wParam:[0x00000001], lParam:[0x01f7017c]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x025f0329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_LBUTTONUP,514], wParam:[0x00000000], lParam:[0x01f7017c]
WH_CALLWNDPROC:[WM_CAPTURECHANGED,533], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x025f0329]
WH_CALLWNDPROC:[WM_SETCURSOR,32], wParam:[0x001709f4], lParam:[0x02000001]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_CALLWNDPROC:[WM_NCHITTEST,132], wParam:[0x00000000], lParam:[0x025f0329]
WH_CALLWNDPROC:[UnKnown,49940], wParam:[0x00000000], lParam:[0x00000000]
WH_GETMESSAGE:[WM_MOUSEMOVE or WM_MOUSEFIRST,512], wParam:[0x00000000], lParam:[0x01f7017c]

The first DOWN/UP sequence was sent from my code, and the button I was trying to press wasn't activated.

The second DOWN/UP sequence was obtained by actually clicking the left mouse button, and this of course activated the button.

Note that using MouseClick function also works, but I am trying to activate the button:
a) without moving the mouse, and
B) on a window in the background, without activating it

Thanks

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
What application are you trying to generate a 'click' in? Is it a web-based application? If it is, which browser do you use?

OSRichard
  • Members
  • 7 posts
  • Last active: Jan 27 2010 06:18 AM
  • Joined: 26 Sep 2009
It is a poker table in the Entraction network. The application is written in Java, probably in AWT (some popups have SunAwtDialog class). I am trying to press the Fold, Call, Raise buttons.

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
If you check the Entraction network's website, they pretty much tell us what kind of success we can expect:

Q: Why do we charge monthly fees?

A: Entraction Network uses Java technology, so the known methods of windows controls manipulation (APIs) does not work (AHK, AutoIT, C/C++, .NET).



OSRichard
  • Members
  • 7 posts
  • Last active: Jan 27 2010 06:18 AM
  • Joined: 26 Sep 2009
Sorry, that's not the Entraction network's webside, it's for a software that does what I try to do with ahk :)

Most of what it does I already successfully replicated with ahk. I can do a lot of stuff to the active table, but I also want to extend the actions to the tables in the background. You can see my current script here

guest3456
  • Guests
  • Last active:
  • Joined: --
I'm having the same problem, on a different poker site. I've tried using ControlClick (as well as the PostClick posted earlier) but no dice. I don't understand this.

btw, MouseClick and Click both work..

guest3456
  • Guests
  • Last active:
  • Joined: --
bump...