Cliclick ( "명령 줄 인터페이스 클릭"의 경우 짧음)은 쉘/터미널에서 마우스 및 키보드 관련 동작을 실행하는 도구입니다. 객관적인 C로 작성되었으며 MacOS 10.15 이상으로 실행됩니다.
저자 : Carsten Blüm, www.bluem.net
Cliclick을 직접 구축하거나 (아래 참조) 릴리스에서 이진을 선택하거나 Homebrew 또는 MacPorts를 사용하여 설치할 수 있습니다.
중요 : 컴퓨터 제어 권한을 터미널 (또는 ITERM 또는 사용하는 모든 것)에게 제공해야합니다. 이것은 시스템 환경 설정에서 수행 할 수 있습니다. Cliclick을 호출하고 아무 일도 일어나지 않으면 허가가 누락되었을 것입니다. Cliclick 5.1 이므로이 경우 Stderr에게 경고가 기록됩니다.
빠른 첫 인상을 얻으려면 cliclick -h 호출 할 때 얻을 수있는 것입니다.
USAGE
cliclick [-r] [-m <mode>] [-d <target>] [-e <num>] [-f <file>] [-w <num>] command1 [command2]
OPTIONS
-r Restore initial mouse location when finished
-m <mode> The mode can be either “verbose” (cliclick will print a
description of each action to stdout just before it is
performed) or “test” (cliclick will only print the
description, but not perform the action)
-d <target> Specify the target when using the “p” (“print”) command.
Possible values are: stdout, stderr, clipboard or the path
to a file (which will be overwritten if it exists).
By default (if option not given), stdout is used for printing
-e <easing> Set an easing factor for mouse movements. The higher this
value is (default: 0), the more will mouse movements seem
“natural” or “human-like”, which also implies: will be slower.
If this option is used, the actual speed will also depend
on the distance between the start and the end position, i.e.
the time needed for moving will be higher if the distance
is larger.
-f <file> Instead of passing commands as arguments, you may instead
specify a file from which cliclick will read the commands
(or stdin, when - is given as filename).
Each line in the file is expected to contain a command
in the same format/syntax as commands given as arguments
at the shell. Additionally, lines starting with the hash
character # are regarded as comments, i.e.: ignored. Leading
and trailing whitespace is ignored, too.
-w <num> Wait the given number of milliseconds after each event.
If you find that you use the “w” command too often,
using -w could make things easier. Please note that “w”
is additive with -w. This means that invoking
“cliclick -w 200 w:500” will wait for 700 milliseconds.
The default (and minimum) value for -w is 20.
-V Show cliclick version number and release date
-o Open version history in a browser
-n Send a donation
COMMANDS
To use cliclick, you pass an arbitrary number of commands as arguments. A command consists of a command identifier (a string that tells cliclick what kind of action to perform) and usually one or more arguments to the command, which are separated from the command identifier with a colon. Example: “c:123,456” is the command for clicking (the “c” is the command identifier for clicking) at the position with x coordinate 123 and y coordinate 456. See below for a list of all commands and the arguments they expect.
Whenever a command expects a pair of coordinates, you may provide relative values by prefixing the number with “+” or “-”. For example, “m:+50,+0” will move the mouse 50 pixels to the right. Of course, relative and absolute values can be mixed, and negative values are possible, so “c:100,-20” would be perfectly valid. (If you need to specify absolute negative values in case you have a setup with a second display arranged to the left of your main display, prefix the number with “=”, for instance “c:100,=-200”.)
LIST OF COMMANDS
rc:x,y Will RIGHT-CLICK at the point with the given coordinates.
Example: “rc:12,34” will right-click at the point with x coordinate
12 and y coordinate 34. Instead of x and y values, you may
also use “.”, which means: the current position. Using “.” is
equivalent to using relative zero values “c:+0,+0”.
m:x,y Will MOVE the mouse to the point with the given coordinates.
Example: “m:12,34” will move the mouse to the point with
x coordinate 12 and y coordinate 34.
kd:keys Will trigger a KEY DOWN event for a comma-separated list of
modifier keys. Possible keys are:
- alt
- cmd
- ctrl
- fn
- shift
Example: “kd:cmd,alt” will press the command key and the
option key (and will keep them down until you release them
with another command)
kp:key Will emulate PRESSING A KEY (key down + key up). Possible keys are:
- arrow-down
- arrow-left
- arrow-right
- arrow-up
- brightness-down
- brightness-up
- delete
- end
- enter
- esc
- f1
- f2
- f3
- f4
- f5
- f6
- f7
- f8
- f9
- f10
- f11
- f12
- f13
- f14
- f15
- f16
- fwd-delete
- home
- keys-light-down
- keys-light-toggle
- keys-light-up
- mute
- num-0
- num-1
- num-2
- num-3
- num-4
- num-5
- num-6
- num-7
- num-8
- num-9
- num-clear
- num-divide
- num-enter
- num-equals
- num-minus
- num-multiply
- num-plus
- page-down
- page-up
- play-next
- play-pause
- play-previous
- return
- space
- tab
- volume-down
- volume-up
Example: “kp:return” will hit the return key.
tc:x,y Will TRIPLE-CLICK at the point with the given coordinates.
Example: “tc:12,34” will triple-click at the point with x
coordinate 12 and y coordinate 34. Instead of x and y values,
you may also use “.”, which means: the current position.
Note: If you find that this does not work in a target application,
please try if double-clicking plus single-clicking does.
ku:keys Will trigger a KEY UP event for a comma-separated list of
modifier keys. Possible keys are:
- alt
- cmd
- ctrl
- fn
- shift
Example: “ku:cmd,ctrl” will release the command key and the
control key (which will only have an effect if you performed
a “key down” before)
dm:x,y Will continue the DRAG event to the given coordinates.
Example: “dm:112,134” will drag and continue to the point with x
coordinate 112 and y coordinate 134.
c:x,y Will CLICK at the point with the given coordinates.
Example: “c:12,34” will click at the point with x coordinate
12 and y coordinate 34. Instead of x and y values, you may
also use “.”, which means: the current position. Using “.” is
equivalent to using relative zero values “c:+0,+0”.
dd:x,y Will press down to START A DRAG at the given coordinates.
Example: “dd:12,34” will press down at the point with x
coordinate 12 and y coordinate 34. Instead of x and y values,
you may also use “.”, which means: the current position.
w:ms Will WAIT/PAUSE for the given number of milliseconds.
Example: “w:500” will pause command execution for half a second
p[:str] Will PRINT the given string. If the string is “.”, the current
MOUSE POSITION is printed. As a convenience, you can skip the
string completely and just write “p” to get the current position.
Example: “p:.” or “p” will print the current mouse position
Example: “p:'Hello world'” will print “Hello world”
du:x,y Will release to END A DRAG at the given coordinates.
Example: “du:112,134” will release at the point with x
coordinate 112 and y coordinate 134.
cp:str Will PRINT THE COLOR value at the given screen location.
The color value is printed as three decimal 8-bit values,
representing, in order, red, green, and blue.
Example: “cp:123,456” might print “127 63 0”
dc:x,y Will DOUBLE-CLICK at the point with the given coordinates.
Example: “dc:12,34” will double-click at the point with x
coordinate 12 and y coordinate 34. Instead of x and y values,
you may also use “.”, which means: the current position.
t:text Will TYPE the given TEXT into the frontmost application.
If the text includes space(s), it must be enclosed in quotes.
Example: “type:Test” will type “Test”
Example: “type:'Viele Grüße'” will type “Viele Grüße”
평소와 같이 Xcode에서 빌드하거나 프로젝트 디렉토리로 cd ing을 통해 쉘에서 빌드 한 다음 xcodebuild 또는 make (원하는대로)를 호출하십시오. 두 경우 모두 Cliclick은 설치되지 않지만 프로젝트 디렉토리에서 "Cliclick"이라는 실행 파일을 가져 오면 원하는 곳으로 이동할 수 있습니다. (당신은 당신이 좋아하는 곳에는 그것을 넣을 수 있습니다.) /usr/local/bin 에 설치하려면 sudo make install 호출 할 수도 있습니다.
코드는 OS X 10.9에서 실행되지만 Xcode 프로젝트에서 선택한 기본 SDK 및 아키텍처는 현재 SDK로 설정됩니다. 따라서 이전 시스템을 위해 빌드하려면이 설정을 그에 따라 변경하십시오. 구축 할 때 문제가 있고 정의되지 않은 기호에 대해 불평하는 메시지를받는 경우 빌드 설정에서 "암시 적으로 링크 된 Objective-C 런타임 지원"을 비활성화하여 수정할 수 있습니다.
새로운 기능, 버그 수정 또는 기타 개선 사항을 제공하려면 풀 요청을 사용하여 수행하십시오. 그러나 조심하십시오 :