Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keeping left mouse button pressed ( and release)
#1
In the Mouse dialog under How to click I can see the options press and release but this doesn't seem to keep the left mouse button pressed (in order to drag things) and release it afterwards. How do I do that?
#2
lef  ;;mouse left button click
lef+ ;;mouse left button down
lef- ;;mouse left button up
#3
some basic examples 


Code:
Copy      Help
int w=win("" "Notepad")
;;;;;several options
;;;;;;;;;;;;;;;#1  will keep left button held until you manually left click mouse
lef+ 10 10 w ;;press and hold left  mouse button down on notepad
;;;;or
;;;;;;;;;;;;;;;#2 will press and hold left mouse button and drag window and release
;lef+ 10 10 w ;;press and hold left  mouse button down on notepad
;mou 0 0 ;; mouse to 0 0 of screen .  while left click is down(lef+) moves mouse and window
;lef-;; release mouse(button up)
;;;;;or
;;;;;;;;;;;;;;;#3 allow some time in between left+(down) and left-(up)
;lef+ 10 10 w
;3;;allow time for window to be moved manually
;lef-;; release
#4
Thanks both, but lef+ only seems to perform a left click it doesn't seem to keep the left mouse button pressed (for dragging around items on the desktop for instance). Also I would like it to be window or application independent is that possible?

Another question, the following left clicks in the center of the screen, but is it also possible to only move the mouse to the center of the screen (no clicking)?

Code:
Copy      Help
lef 0.5 0.5
#5
not sure what's going on but 
int w=win("" "Notepad")
lef+ 10 10 w

will left click down and hold on notepad window 
think i figured out your issue. don't put commands in a Macro. For some reason must be a function


 to move the mouse to center of screen use

mou 0.5 0.5

this works
Function LeftClicknHold
Code:
Copy      Help
int w=win("" "Notepad")
lef+ 100 10 w


this doesn't
Macro LeftClicknHold2
Code:
Copy      Help
int w=win("" "Notepad")
lef+ 100 10 w

why the commands don't work as a macro  i have no idea

 Gintaras  is this a bug?
#6
Thanks! Yes as a function it works. Good to know.
#7
update

 this will work if you change macro properties to run simultaneously  

Macro LeftClicknHold2
Code:
Copy      Help
int w=win("" "Notepad")
lef+ 100 10 w
#8
Macros run in a more safe way than functions. When a macro ends, the program releases mouse buttons and Ctrl etc pressed by the macro.
#9
Gintaras,

How is the development of the new QM version that will run on C# going?
I take it that rendered executables with that version will need the net framework?

I noticed that compiled QM dialogs run slightly faster than similar dialogs made with Visual Studio which seems odd considering QM executables would have to load their own framework/runtime first?
#10
> How is the development of the new QM version that will run on C# going?
About 50% done.

> I take it that rendered executables with that version will need the net framework?
Yes.

> I noticed that compiled QM dialogs run slightly faster than similar dialogs made with Visual Studio ...
Yes, C# programs start slower, because of JIT compiling and very slow loading of assemblies. But QM3 scripts will start fast in most cases.


Forum Jump:


Users browsing this thread: 2 Guest(s)