Skip to content

Conversation

@boisy
Copy link

@boisy boisy commented Dec 21, 2021

I modified the Safari/Show|Create-Tab.applescript file to make it more robust, handling the situation where there is no open Safari window. The existing script fails if Safari is not running, or is running but has no window open.

I also added an activate just below the tell application "Safari" line in case Safari wasn't already launched. This helps in bringing up a fresh window in that case.

I tested this script with Safari 15.2 on macOS 12.1 Monterey.

This script fails if there is no Safari window open. I added a check on lines 25-27 so it can handle this case.
Modified to check for Safari window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant