I’m very new to UXP programming, but have been doing JS, server, and app programming for years now. I’m looking into how much I can do with a plugin for a client of ours and have already setup a testing plugin that I’m using as a PoC/playground.
I have it set up with an eventNotifier
since is appears that the GREAT majority of functionality is only going to be unlocked via batchPlay. This isn’t a big deal, I’ve already made an event “recorder” that I have grabbing those events and reshaping them into ActionDescriptors so I can feed them right back into batchPlay and enjoy!
However, I’ve notice that some events aren’t behaving the same as others and most of them seem to be of type “invokeCommand”. This is fed an ID which I assume corresponds to the internal function for that tool/function/whatever you want to call it.
One example of this is toggling a window. I was wanting to toggle on the timeline window after doing a “load files into stack” and was able to trigger the load files into stack (after using the ScriptListener plugin since the “_obj”: “AdobeScriptAutomation Scripts” doesn’t seem to trigger my event notifier), but am having issue with getting the timeline to toggle on after. The descriptor I’m getting is as follows:
let desc = {
"_obj": "invokeCommand",
"commandID": 1188,
"kcanDispatchWhileModal": true
};
But this is erroring with:
open timeline results: [
{
"message": "The command “<unknown>” is not currently available."
}
]
Which from my experience with it so far mains that the “_obj” isn’t recognized, so I started trying to find anything I could about “invokeCommand” and have come up with only one post on the internet which is on these forums and basically acts like everyone should know to ignore it( https://forums.creativeclouddeveloper.com/t/certain-actions-not-recording-in-alchemist-using-script-listener-to-get-info/2187 ).
So TL;DR My question is what’s the deal with “invokeCommand” type events? Are they “protected” so they can’t be executed via “batchPlay”? Do they all have another descriptor and are really meant just to be listened to to know that that thing happened? I don’t even see an event in “ScriptListener” and only see the invoke in both my plugin and the Alchemist plugin, so how should I find the descriptor I need? Or have I reached one of the edges of what is possible in a plugin?
Thanks in advance for any relevant info!