BlueM / cliclick

macOS CLI tool for emulating mouse and keyboard events
https://www.bluem.net
Other
1.59k stars 116 forks source link

-e option argument not applying to subsequent dm commands #165

Closed Deegobooster closed 1 year ago

Deegobooster commented 1 year ago

I have a use case where I want to click and drag along a series of coordinates. Currently, my implementation is very simple. I have a file with the list of coordinates as such;

dd:x,y
dm:x1,y1
...
dm:x30,y30
du:x31,y31

and run cliclick with the -f option argument pointing to the file with the list.

However, when I add the -e option argument (let's say -e 20) it only eases the movement from the initial mouse position to the first command in the list (dd:x,y). After which all subsequent commands execute without easing.

What I want is for easing to apply to all commands in the list.

BlueM commented 1 year ago

I am not able to reproduce this with the latest cliclick version (5.1). Demo with moving:

https://user-images.githubusercontent.com/1493457/222905726-2348116a-7b1f-4f8a-8230-4029e7090e64.mov

Demo with dragging and moving, like in your example:

https://user-images.githubusercontent.com/1493457/222905744-3c95c137-a28c-47bd-981b-687b7a2ee605.mov

Deegobooster commented 1 year ago

Thanks for taking the time to respond and test my issue. When I noticed you were using an -e value of 800 I realised that may have been the issue. I personally hadn't seen anyone use higher values than 20 before so I didn't consider it.

It does turn out I wasn't using an -e value high enough and I didn't notice due to the distances between each point being very short.

Solution: After setting -e to 1000 I was able to notice the easing.

Thanks.

Let this be a lesson to anyone else with the same use case.