-
Notifications
You must be signed in to change notification settings - Fork 2
/
allowremote
29 lines (29 loc) · 960 Bytes
/
allowremote
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
#!/usr/bin/env osascript
set fullPathSafari to "/Applications/Safari Technology Preview.app"
tell application fullPathSafari to activate
delay 2
tell application "System Events"
tell application process "Safari Technology Preview"
key code 53
keystroke "," using command down
set frontmost to true
tell window 1
click button "Advanced" of toolbar 1
delay 2
set theCheckbox to checkbox 4 of group 1 of group 1 of it
tell theCheckbox
if not (its value as boolean) then click theCheckbox
end tell
delay 2
keystroke "w" using command down
delay 2
end tell
tell menu bar item "Develop" of menu bar 1
click
delay 2
click menu item "Allow Remote Automation" of menu 1
delay 2
end tell
end tell
end tell
tell application fullPathSafari to quit