Hello all,
I am using successfully the ‘open location’ command in a sandboxed app to open a URL.
Ideally I would like to close the just opened tab again, once the user has seen it, to avoid clutter in his/her browser. This script works after giving temporary apple event entitlement for com.apple.safari:
tell application "Safari"
activate
tell application "Safari" to close (every tab of every window whose URL contains "searchTerm")
end tell
BUT - I am pretty sure that AppStore Review will not approve a blanket exception for all of Safari.
I was looking into the Safari sdef file, whether there is a scripting target in Safari that I could use instead, but failed to find a suitable one.
Is there another way to achieve a closure of a specific Safari tab in a sandboxed app, without requiring the temporary exception path for Safari?
Thank you for any input!