-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuip.applescript
52 lines (43 loc) · 1.01 KB
/
Quip.applescript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
on openItem()
end openItem
on getName()
tell application "System Events"
tell process "Quip"
tell window 1
get title
end tell
end tell
end tell
end getName
on getAddress()
tell application "System Events"
tell process "Quip"
tell window 1
set UP_ARROW to 126
-- key code down_arrow
key code UP_ARROW using command down
keystroke "a" using {command down, shift down}
delay 0.5
get the clipboard
end tell
end tell
end tell
end getAddress
on newItem()
tell application "Quip" to activate
tell application "System Events"
tell process "Quip"
click menu item "New Document" of menu "File" of menu bar item "File" of menu bar 1
tell window 1
set UP_ARROW to 126
-- key code down_arrow
key code UP_ARROW using command down
keystroke "a" using {command down, shift down}
delay 0.5
get the clipboard
end tell
end tell
end tell
end newItem