-
Notifications
You must be signed in to change notification settings - Fork 1
/
HideMyMail.scpt
58 lines (58 loc) · 1.83 KB
/
HideMyMail.scpt
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
on run argv
tell application "System Settings"
activate
delay 0.5
reveal pane id "com.apple.systempreferences.AppleIDSettings*AppleIDSettings"
end tell
tell application "System Events"
tell application process "System Settings"
tell splitter group 1 of group 1 of window 1
tell group 2 to tell group 1 to tell scroll area 1 to tell group 3
repeat until UI element 1 exists
delay 0
end repeat
click UI element 1
repeat until UI element 2 exists
delay 0
end repeat
click UI element 2
end tell
end tell
repeat until group 1 of group 1 of UI element 1 of scroll area 1 of sheet 1 of window 1 exists
delay 0
end repeat
tell window 1 to tell sheet 1 to tell scroll area 1 to tell UI element 1
tell group 1 of group 1
click UI element 4 of group 1
repeat until text field 1 of group 4 exists
delay 0
end repeat
click text field 1 of group 4
set value of text field 1 of group 4 to argv
end tell
tell group 1 to tell group 2 to tell group 1
repeat until UI element 1 of group 2 exists
delay 0
end repeat
click UI element 1 of group 2
repeat until UI element 1 of group 1 exists
delay 0
end repeat
click UI element 1 of group 1
repeat until UI element 1 of group 2 exists
delay 0
end repeat
click UI element 1 of group 2
repeat until UI element 1 of group 1 exists
delay 0
end repeat
click UI element 1 of group 1
end tell
end tell
end tell
end tell
tell application "System Settings"
delay 1
quit
end tell
end run