Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mouse down very long
#1
is it possible to have a left mouse down trigger which will be only started
after some defined time?

if left mouse down longer than 2 seconds show a toolbar or dialog with extra options.
and tell the host program to ignore mouse release.
pi
#2
Without eating - yes. The macro can wait for mouse button up...
With eating - I think no, because then need to eat DOWN and UP events.
#3
what would be your code for without eating?
pi
#4
Code:
Copy      Help
lef+ 109 577 win("Program Manager" "Progman"); 2.00
lef- 109 577 win("Program Manager" "Progman")


The 2.00 is the amount of waiting that the mouse is holding down, when you let go, than mouse will lef-
#5
Macro
Trigger #L 0x9     Help - how to add the trigger to the macro
Code:
Copy      Help
POINT p p2
xm p
int t1=GetTickCount
wait 30 ML; err ret
if(GetTickCount-t1<2000) ret
xm p2
if(_hypot(p2.x-p.x p2.y-p.y)>3) ret

OnScreenDisplay "/\/\/\/\/"

or

Macro
Trigger #L 0x9     Help - how to add the trigger to the macro
Code:
Copy      Help
POINT p p2
xm p
wait 2 ML; err goto g1
ret
;g1
xm p2
if(_hypot(p2.x-p.x p2.y-p.y)>3) ret

OnScreenDisplay "/\/\/\/\/"
#6
that is so beautiful!

i use the first example and have it running also in my vmware dev machine.
now i see two /\/\/\/\/.
usually vmware takes over when you activate a virtual machine.
pi
#7
what is _hypot ?
pi
#8
my guess is hypotenuse of triangle with sides p2.x-p.x & p2.y-p.y, or a way of measuring the diagonal movement of the mouse
#9
Yes, hypot(a b) is sqrt(pow(a 2)+pow(b 2)), and it gives distance from p to p2 in any direction.


Forum Jump:


Users browsing this thread: 3 Guest(s)