Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
lef
#1
is it possible to use lef in two different locations at the same time?

see example below, it presses down, waits 3 seconds, and releases mouse

can this be done in multiple locations simultaneously? maybe with command other then lef? needs to press down on mouse wait 3 seconds, then release mouse.


Macro Macro1
Code:
Copy      Help
int w=win("Program Manager" "Progman")
lef+ 345 597 w 1 ;;list 'Desktop', list item 'SONJ MESH PRINT'
3
lef-
#2
Probably not. The target window would see it as a mouse drag operation.
#3
is there an alternate to lef that emulates mouse down and up using screen coordinates?
#4
Use PostMessage with WM_LBUTTONDOWN and WM_LBUTTONUP. Works not with all windows/controls. Documented in MSDN.
#5
Not sure if possible in virtual machine?

for context:

end goal; send click command in same exact location on multiple virtual machine instances simultaneously.
#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
#7
thank you very nice function

sadly, does not work in virtual machine window
#8
Any other possible solution for clicking inside virtual machine without using mouse?
#9
Run QM in virtual machine. I don't know more solutions.


Forum Jump:


Users browsing this thread: 1 Guest(s)