Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
lef
#6
Function PostLeftClickMessage
Code:
Copy      Help
;/
function w x y [flags] ;;flags: 1 down only, 2 up only, 4 activate window, 8 move mouse

;Posts message WM_LBUTTONDOWN and/or WM_LBUTTONUP to window w or its child control at that point.

;w - window or control.
;x, y - point coordinates in w client area.

;REMARKS
;It is an alternative to lef. With some windows works even if the window is not active.
;Works not with all windows/controls. Try flag 4 or/and 8.
;Does not wait until the window receives and processes the message.

;EXAMPLE
;int w=win("Notepad")
;PostLeftClickMessage(w 10 10)


if(w=0) end ERR_WINDOW

if(flags&4) act w
if(flags&8) mou x y w 1

int w1=child(x y w 8); err
if(w1) MapWindowPoints(w w1 +&x 1); w=w1

int lparam=MakeInt(x y)
if(flags&2=0) PostMessage w WM_LBUTTONDOWN MK_LBUTTON lparam
if(flags&1=0) PostMessage w WM_LBUTTONUP 0 lparam


Messages In This Thread
lef - by QM_Expert - 07-25-2018, 05:44 PM
RE: lef - by Gintaras - 07-25-2018, 05:52 PM
RE: lef - by QM_Expert - 07-25-2018, 05:54 PM
RE: lef - by Gintaras - 07-25-2018, 08:16 PM
RE: lef - by QM_Expert - 07-25-2018, 08:49 PM
RE: lef - by Gintaras - 07-26-2018, 09:00 AM
RE: lef - by QM_Expert - 07-26-2018, 02:48 PM
RE: lef - by QM_Expert - 07-28-2018, 04:52 AM
RE: lef - by Gintaras - 07-28-2018, 05:12 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)