-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathsnapshot.scpt
22 lines (16 loc) · 953 Bytes
/
snapshot.scpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
tell application "System Events"
(* Note: If used as the default two mouse-click solution then use as is, nothing else needs to be done. *)
keystroke "$" using {command down}
delay 0.25
keystroke space
(* Note: If using as the one mouse-click solution or Automator Service, uncomment the
two lines below having double-dashes in front by removing the double-dashes.
Also when using as the one mouse-click solution, set a value on the 'delay' command
below to an appropriate value which allows you the time necessary to move the mouse
over the target window before that delay command times out and the snapshot is taken.
The default of '1.5' is in this use case is a somewhat arbitrary value, set it to suite.
Note: When using as an Automator Service set the 'delay' command below to '0.25',
the same as in the first 'delay' command. *)
delay 0.25
do shell script "/usr/local/bin/cliclick c:."
end tell