Hello,
I have a script like below:
I have two questions as
- when I run it, showed rwarning result like below. Question 1 is what is wrong this code? and How to correct it. I use serria os
Question 2 is I wanna add block incoming connection of specific app to firewall. How can I write it on code like above?
I have a script like below:
Code:
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.security"
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Security & Privacy" of menu "View" of menu bar 1
if title of button 4 of window 1 is "Click the lock to make changes." then
click button "Click the lock to make changes." of window 1
end if
try
click button "Turn On Firewall" of tab group 1 of window "Security & Privacy"
end try
set visible to false
end tell
end tell
tell application "System Preferences" to quit
I have two questions as
- when I run it, showed rwarning result like below. Question 1 is what is wrong this code? and How to correct it. I use serria os
error "System Events got an error: Script Editor is not allowed assistive access." number -1719 from menu bar 1 of process "System Preferences"
Question 2 is I wanna add block incoming connection of specific app to firewall. How can I write it on code like above?