There are several solutions to try when an Apple script does not function after an upgrade from Capitan to Mojave:
- Restart your computer and try running the script again.
- Check if the script is compatible with Mojave. Some scripts may need to be updated to work with the new operating system.
- Try running the script in Script Editor or another script editor to see if the issue is with the script or with the application running the script.
- Check if the application has changed its behavior in Mojave. For example, if the application no longer allows scripts to restore minimized windows, the script may not work as expected.
- If the script is still not working, try using a different method to restore the minimized window, such as using a keyboard shortcut or clicking on the application in the Dock.