AppleScript not working if sandbox in enabled `We are using Java to get the active application running on macOS using AppleScript.