I am trying to navigate to security pane in system preferences using below script, if pane is already opened and minimised, script is not able to bring it front. Is there a way along with activation , I can bring it to front
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.security"
end tell
This script checks the state of the window.
If the window is visible do nothing.