I am posting this in the Sequoia forum because I suspect that the issue relates to security features in Sequoia. I have a new Mac Mini (M4) running Sequoia 15.5, and I have installed all the latest security updates. I am using an AppleScript in Script Editor that is designed to open the Terminal app and send three commands. However, the script executes successfully occasionally, while at other times it fails due to a keystrokes permission error.
A standalone app created from this script encounters the same inconsistency. I have the latest version of Python3 installed on the Mini. The standalone app is crucial for me, as I want to set it as a login item so that it runs automatically in the event of a power failure and the Mac Mini reboots. The script used to work flawlessly on my previous Mac Mini (2014 Intel).
Here’s a brief overview of the script:
1. The script waits for 30 seconds to allow the Mini to fully reboot. 2. It opens the Terminal.
3. It changes the command line to the “pigs” directory located in my user account. 4. It runs a Python script named pigs.py.
5. Finally, it enters the administrator password via sudo. The main issue is the inconsistent execution. There seems to be no pattern to when it works or fails; it feels random.
Previously, this script worked perfectly for about ten years on my older Mac Mini. I have reached out to Apple Support, spending around 40 minutes trying to troubleshoot, but they could not identify the problem. Given that the script occasionally runs without issues, this seems to indicate a potential OS issue. Any advice or suggestions would be highly appreciated.
Thank you,
Mark
Leave a Reply