Deprecation warning due to gatekeeper restrictions, should move to either osascript or research another alternative. Maybe try to make it into an installation package: https://victoronsoftware.com/posts/script-only-macos-install-package/