Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications for more robustness #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

None yet

1 participant