Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - On the problem of setting the mouse to hold down and drag with the key wizard
On the problem of setting the mouse to hold down and drag with the key wizard
Dim pinx

Pinx = plug-in. Sys.GetScRX()

Call smoothly moves the mouse to (pinx, 0,5000,0, 10).

//Here is an example. The mouse moves from the upper left corner of the screen to the upper right corner of the screen for 5 seconds. This is the parameter.

//Parameters: Smoothing Sensitivity Description: Shaping, the range is 1~ Maximum coordinate difference, and the distance that the mouse crosses at one time.

//The longer the total moving time or the shorter the starting coordinate distance, the smaller the smoothing sensitivity, the better.

//On the contrary, the larger the coordinate, the more accurate it is, but generally it does not exceed 10% of the maximum difference of the starting coordinate.

//Set the sensitivity to adjust the delay function. If the delay is too short, the delay cannot be performed accurately.

Function smoothly moves the mouse to (end coordinate px, end coordinate py, moving time, start coordinate beginx, start coordinate beginy, smooth sensitivity).

dim mx

Dimensions x, y

Dim tx, ty

X= starting point coordinate beginx

Y= starting point coordinate beginy

Tx=abs(x terminal coordinate px)

Ty=abs(y terminal coordinate py)

If tx & gt=ty

mx=tx

other

mx=ty

If ... it will be over.

If mx>0

For i = 0 to mx step smoothing sensitivity

Sx=int ((end coordinate px*i+x*(mx-i))/mx)

Sy=int ((terminal coordinate py*i+y*(mx-i))/mx)

Move to sx, sy

Delay int (moving time /mx* smoothing sensitivity)

then

other

Delayed moving time

If ... it will be over.

Move to the end coordinate px, end coordinate py

Move the mouse smoothly to =true.

End function