BlueM / cliclick

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

Mojave 10.14 support #83

Closed apximax closed 6 years ago

apximax commented 6 years ago

It totally doesn't work on Mojave 10.14. I tried to build it (sudo make install), build process was successful, but the result was the same as when I just install cliclick using homebrew or downloading from the site.

When I try some command I see typical message (verbose mode), but nothing happens.

BlueM commented 6 years ago

What exactly is the command(s) you have tried?

apximax commented 6 years ago

Tried to use next script:

#!/bin/bash

sleep 5

while [ : ]
do
  NUMBER=$[ ( $RANDOM % 5 ) + 0 ]
  sleep $NUMBER

  cliclick -m verbose kd:ctrl
  for i in `seq 1 $[ ( $RANDOM % 10 ) + 1 ]`
  do
    cliclick -m verbose kp:tab
  done
  cliclick -m verbose ku:ctrl

  for i in `seq 1 $[ ( $RANDOM % 5 ) + 0 ]`
  do
    cliclick -m verbose kp:page-up
  done

  for i in `seq 1 $[ ( $RANDOM % 5 ) + 0 ]`
  do
    cliclick -m verbose kp:page-down
  done

done

Output: image

Also tried something like

cliclick -m verbose m:1370,70
cliclick -m verbose c:1370,70
etc

The script above had worked before I updated mac os from high sierra to mojave.

Maybe it will be helpful: When I faced this problem then I tried to find some similar tool. I didn't find anything that allows me emulate keyboard events. But I just tested MouseTools and it doesn't work for me too...

Unfortunately I have nobody else who could test these tools on mac os mojave.

apximax commented 6 years ago

@BlueM Sorry, my bad The cause was not in the cliclick utility

klysdale commented 6 years ago

Was there resolution to this case? I use cliclick as well and it doesn't respond at all now on Mojave. Just looking to see if there is a fix yet on Mojave. Thanks,

BlueM commented 6 years ago

If you have problems with cliclick on Mojave, make sure you have granted full disk access to Terminal (or iTerm) in the security section of the system preferences.

klysdale commented 6 years ago

Thanks. I have added Terminal to Full Disk Access but it didn't change anything. Terminal was restarted as well.
screen shot 2018-11-01 at 1 57 46 pm

BlueM commented 6 years ago

I’m sorry, but then I have no idea. I haven’t experienced any misbehavior on Mojave myself, and a user who mailed me because cliclick appeared to do nothing was able to fix this by granting Full Disk Access. I don’t know of any other causes.

apximax commented 6 years ago

@klysdale For me now it works without full disk access to Terminal, I just granted Accessibility rights to Terminal and it is enough...

klysdale commented 6 years ago

@apximax, Thank you. Granting accessibility rights worked.

sachinhr10 commented 5 years ago
Screenshot 2019-07-29 at 3 08 38 PM

getting this message when trying to run test on a mac Catalina machine (10.15 beta)

Tried giving full drive access to terminal. Still getting the same message. Also cliclick option isn't visible in the access grant list.