-
Notifications
You must be signed in to change notification settings - Fork 4
/
first.applescript
102 lines (87 loc) · 2.13 KB
/
first.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
repeat 1 times
delay 0.2
tell application "Keychain Access"
activate
tell application "System Events"
delay 0.2
keystroke return
-- Press ⌘C to copy item title
delay 0.2
keystroke "c" using command down
end tell
end tell
--Switch to TextEdit
delay 0.2
tell application "TextEdit"
activate
tell application "System Events"
-- Press ⌘V
delay 0.2
keystroke "v" using command down
-- Type a comma
delay 0.2
keystroke ","
end tell
end tell
--Switch to Keychain
tell application "Keychain Access"
activate
tell application "System Events"
-- Press Tab x2
delay 0.1
keystroke tab
delay 0.1
keystroke tab
-- Press ⌘C
delay 0.2
keystroke "c" using command down
end tell
end tell
--Switch to TextEdit
delay 0.2
tell application "TextEdit"
activate
tell application "System Events"
-- Press ⌘V
delay 0.2
keystroke "v" using command down
-- Type ','
delay 0.2
keystroke ","
end tell
end tell
--Switch to Keychain
tell application "Keychain Access"
activate
tell application "System Events"
-- Click the “Show password:” checkbox.
delay 0.2
keystroke "c" using {shift down, command down}
-- Type password - update to yours
delay 0.5
keystroke "password"
delay 0.2
keystroke return
-- Close keychain item window
delay 0.3
keystroke "w" using command down
-- Go to next keychain item
delay 0.2
key code 125
end tell
end tell
--Switch to TextEdit
delay 0.2
tell application "TextEdit"
activate
tell application "System Events"
-- Press ⌘V
delay 0.2
keystroke "v" using command down
-- Press Return
delay 0.2
keystroke return
end tell
end tell
end repeat
end run