Good News! After many hours of testing and debugging today, I finally got SexScripts working on macOS Mojave! At the same time, I found that getFile() is still problematic. Here's some details of what I found.
The webcam error, as I suspected, was a security precaution. It seems that something is blocking the "Jar Launcher" application from prompting for webcam permission. Here's the exact error I found in the system logs:
Code:
Policy disallows prompt for RESP:{ID: com.apple.JarLauncher, PID[20268], auid: 501, euid: 501, responsible path: '/System/Library/CoreServices/Jar Launcher.app/Contents/MacOS/Jar Launcher', binary path: '/System/Library/CoreServices/Jar Launcher.app/Contents/MacOS/Jar Launcher'}, ACC:{ID: net.java.openjdk.cmd, PID[20269], auid: 501, euid: 501, binary path: '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java'}, REQ:{ID: com.apple.tccd, PID[252], auid: 0, euid: 0, binary path: '/System/Library/PrivateFrameworks/TCC.framework/Versions/A/Resources/tccd'}; access to kTCCServiceCamera denied
There are two work-arounds, but both are basically the same thing: run SexScripts from the command line in terminal, or create an Automator program, so that you can just double click on an icon as usual.
Here's the terminal command:
Code:
java -jar sexscripts.jar
For automator (which is what I'm using) add a "Run Shell Script" action with the following code:
Code:
cd sexscripts
java -jar sexscripts.jar
(You'll want to include the full path to the sexscripts home directory.)
The first time you run a script that uses the webcam, you'll be prompted to allow access. After that, everything works as before. Whew!
However, in the process of researching all this, I also found that getFile() doesn't work reliably. Nor can I find any error messages or logs related to what's happening--it just stops. In previous versions of macOS, getFile() didn't work at all. It still doesn't really work if the webcam is missing. However, if you explicitly call it, it works the first time. After that, it's hit or miss.
It *seems* to be more reliable if you wait a while between calls. However, adding waits and buttons didn't really seem to have an effect. Perhaps the wait needs to be longer, or perhaps I just got lucky a few times, who knows.
It would be nice to have getFile() working in the even a webcam isn't available, and also for scripts like Courtroom that require the occasional file upload.
Anyway, if there are other Mac users waiting to upgrade, it looks like SexScripts is usable with a webcam again now.