- Posts: 7
- Thank you received: 0
3 Post Moderation Rule for New Boarders (25 Jan 2021)
New boarders will have their posts moderated - Don't worry if you cannot see your post immediately.
Check if FCPX can interact with my desktop app
22 Jan 2017 08:42 #85075
by JeffW.
Check if FCPX can interact with my desktop app was created by JeffW.
I want to check if Final Cut Pro X can communicate with my nwjs desktop app. After I packaged my app I updated the Info.plist: making the app scriptable, adding the key com.apple.proapps.MediaAssetProtocol with an empty dictionary and adding the .sdef key/value.
The .sdef contains the the Standard suite. And the ProVideo Asset Management suite:
Apple docs
Now I’m trying to make an applescript call from ScriptEditor as described in this example to to test my application’s ability to interact with Final Cut Pro X
More Apple docs
I only changed the name of the application:
When I run the scrip inScriptEditor it throws: nwjs got an error: Can’t make class asset.
Is the sdef not being recognized?
Do I need to implement any code in my app to listen and respond to the call or should it work just like this?
Does it maybe have to do with the way nwjs apps are packaged?
Thanks
The .sdef contains the the Standard suite. And the ProVideo Asset Management suite:
Apple docs
Now I’m trying to make an applescript call from ScriptEditor as described in this example to to test my application’s ability to interact with Final Cut Pro X
More Apple docs
I only changed the name of the application:
Code:
tell application "my_app"
make new asset with properties ¬
{name:"MyNewAsset", metadata:{|com.apple.proapps.share.episodeID|:"MyNewEpisode"}, data options:{|availableMetadataSets|:{"Camera View", "General View"}}} ¬
set newAsset to result
set theLocation to location info of newAsset
set theLibraryLocation to library info of newAsset >>> I deleted this line, it gives an error
set theMetadata to metadata of newAsset
set theDataOptions to data options of newAsset
end tell
When I run the scrip inScriptEditor it throws: nwjs got an error: Can’t make class asset.
Is the sdef not being recognized?
Do I need to implement any code in my app to listen and respond to the call or should it work just like this?
Does it maybe have to do with the way nwjs apps are packaged?
Thanks
Please Log in to join the conversation.
22 Jan 2017 09:09 #85076
by JeffW.
Replied by JeffW. on topic Check if FCPX can interact with my desktop app
I pasted the entire ProVideo Asset Management suite in the .sdef file instead of only adding the
<suite>...</suite >
part and now using this applescript make the formatting colors look correct:
It throws this error though: The handler some object is not defined." number -1717
What does some object refer to? Should I implement a handler in my app or should this just work based on only the .sdef?
<suite>...</suite >
part and now using this applescript make the formatting colors look correct:
tell application "myapp"
make new asset with properties ¬
{name:"MyNewAsset", metadata:{|com.apple.proapps.share.episodeID|:"MyNewEpisode"}, data options:{|availableMetadataSets|:{"Camera View", "General View"}}} ¬
set newAsset to result
set theLocation to location info of newAsset
set theLibraryLocation to library info of newAsset
set theMetadata to metadata of newAsset
set theDataOptions to data options of newAsset
end tell
It throws this error though: The handler some object is not defined." number -1717
What does some object refer to? Should I implement a handler in my app or should this just work based on only the .sdef?
Please Log in to join the conversation.
- Andreas Kiel
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1077
- Thank you received: 189
22 Jan 2017 12:16 #85082
by Andreas Kiel
Replied by Andreas Kiel on topic Check if FCPX can interact with my desktop app
You probably won't find the answer here.
But looking at your code "tell application ..." the "my_app" causes an error - not the script.
But looking at your code "tell application ..." the "my_app" causes an error - not the script.
Please Log in to join the conversation.
22 Jan 2017 12:22 - 22 Jan 2017 12:23 #85084
by JeffW.
Replied by JeffW. on topic Check if FCPX can interact with my desktop app
Thanks. Why would that cause an error? I should've added this is not the real name of my app btw, just changed it in this post for the sake of client discreteness 
Now I see I used both my_app and myapp, sorry for the confusion.
Now I see I used both my_app and myapp, sorry for the confusion.
Last edit: 22 Jan 2017 12:23 by JeffW..
Please Log in to join the conversation.

