Skip to content

Modifications for more robustness#1

Open
DrPitre wants to merge 3 commits into
kevin-funderburg:masterfrom
DrPitre:master
Open

Modifications for more robustness#1
DrPitre wants to merge 3 commits into
kevin-funderburg:masterfrom
DrPitre:master

Conversation

@DrPitre
Copy link
Copy Markdown

@DrPitre DrPitre 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