Post

Replies

Boosts

Views

Activity

Can't get assistive access - error using system events in AppleScript
We have a sandboxed Final Cut Pro (FCP) workflow extension that needs to control FCP to export the current video project. When executing an AppleScript, we encounter the error: "System Events got an error: FCPExtension (Final Cut Pro) is not allowed assistive access." This occurs despite the container app having been granted automation and accessibility permissions by the user. What could be missing from the project to ensure the script runs without issues? AppleScript: shareDestination("Destination") on shareDestination(_dest) tell application "Final Cut Pro" activate end tell tell application "System Events" set frontmost of process "Final Cut Pro" to true tell process "Final Cut Pro" perform action "AXRaise" of (first window whose name contains "Final Cut Pro") click menu bar 1 tell menu bar 1 tell item 3 of menu bar items tell menu 1 tell menu item 12 tell menu 1 set menuItems to menu items whose title is (_dest & "…") if length of menuItems > 0 then set targetMenuItem to item 1 of menuItems if enabled of targetMenuItem then try click targetMenuItem on error errMsg number errNum error errMsg end try else error "Share destination is not enabled." & return & "Please try selecting an item in Final Cut Pro." end if else error "Share destination not found." end if end tell end tell end tell end tell end tell end tell end tell end shareDestination As soon as the script reaches set frontmost of process "Final Cut Pro" to true it launches the error.
0
0
227
Sep ’24
My Final Cut Pro extension is not allowed assistive access
I’m building an app extension for Final Cut Pro. It includes a main app that doesn't perform any actions, an extension that handles the code execution, and an export app responsible for uploading the exported file. To assist the user, I’ve added an upload button that triggers an AppleScript. This script exports the current project and then uploads it. The AppleScript simply selects the share option and the appropriate share destination. However, the issue arises when I click the upload button: the app asks the user to grant Automation permission, allowing it to control Final Cut Pro and System Events. After granting this permission, the script proceeds to the AppleScript, but an error occurs, stating: System Events got an error: APP is not allowed assistive access. Is there a permission I'm missing?
0
1
273
Sep ’24
FCP plugin crashes when launching its app
I'm developing a workflow extension for Final Cut Pro, but I'm encountering a setback. For some reason, the extension crashes if I launch the app that contains the plugin. I already added some logic to prevent the app from launching if one is already running, but that didn't fix the issue because the plugin crashes while the app is still loading. It seems to me that the plugin process is being killed while the app is loading, causing the plugin to crash. Do you know why this is happening and how to solve it?
5
1
492
Jul ’24