I'm hitting a wall where Premiere is constantly stealing focus from AME, so that it's virtually impossible to focus AME short of calling the executable directly, and even that doesn't always work.
Which never seems to work for any app.
And with Vulcan, I've tried:
const vulcan = new Vulcan(); vulcan.launchApp('ame-14.0', true, '');
Both of which only work if I set a timeout and focus away from my CEP panel, so it's impractical for a button usage.
The Vulcan method works fine for other Adobe apps but not AME. There seems to be a strange focus battle with Premiere and AME when a CEP panel is in focus.
My current workaround, is finding the Media Encoder execuatble and calling it directly with execSync() so that it's brought to the front, but on Windows that only works if AME has been launched after a CEP panel, and on Mac it only works if AME has been launched before the CEP panel.
Has anyone else run into this? Thanks!
I haven't run into it or heard about it, but that doesn't mean it isn't occurring...
What are you trying to do in AME, once you've forced it to the front?
Perhaps just firing a BridgeTalk message to AME (like PProPanel does, here) might work?
Thanks Bruce, I tried that but running into the same issue unfortuantely.
As you can see from this GIF, some of these functions will highlight the app, but will not bring it into focus, it stays behind Premiere. However, once AME has been focused after the panel has been launced for the first time, then vulcan.launchApp() and execFileSync() will work.
(testing on CC 2020, but run into the same issues on 2021)
I've uploaded a sample unsigned cep panel with the various approaches I've tried if you can test and see if you're running into the same issues on your end:
The only panel button which fails for me (after I updated all the AME 14.0 references to 15.0) is the last one, execFileSync().
So I tested on a Mac and I get the same results as you, all functions work execpt execFileSync() (probably not grabbing the right executable file). So that's good news.
It seems this is a Windows-specific issue then. Still doesn't work on Windows, I just tested on a different Windows machine and got the same issue.
Back to my other question: What are you trying to do in AME, once you've forced it to the front?
I've got a panel that queues clips from Premiere to AME. Once they've been queued, it makes sense for AME to be focused so the user can easily hit Render without having to navigate to the AME window.
Maybe it's a Windows 10 bug or something, cause as you can see in the GIF, the AME icon on the toolbar does highlight orange like it's trying to focus, but it stays behind Premiere until you've manually clicked it the first time.
We're tracking the issue as DVAME-4199114.
Awesome, thank you!