Copy link to clipboard
Copied
Is it possible to write something (JavaScript/COM programming/plugin) that has access to a 3rd party plugin/palette? I'm talking about XMPie uDirect. XMPie doesn't offer an official API for the plugin but I want to invoke a special action automatically that can be accessed only by the plugin's InDesign palette. I want some kind of automation.
Javascript, Applescript, and Visual Basic all operate from the same COM info; the one that the plugin writer makes available to it. If the plugin writer did not do this, you cannot control a plugin through scripting.
Writing a custom plugin that hooks into an existing is something quite else ... there is a complete sub-forum dedicated to writing plugins: InDesign SDK
... I doubt you get very far with that if the original creators didn't document their code *extensively*.
Copy link to clipboard
Copied
Javascript, Applescript, and Visual Basic all operate from the same COM info; the one that the plugin writer makes available to it. If the plugin writer did not do this, you cannot control a plugin through scripting.
Writing a custom plugin that hooks into an existing is something quite else ... there is a complete sub-forum dedicated to writing plugins: InDesign SDK
... I doubt you get very far with that if the original creators didn't document their code *extensively*.
Copy link to clipboard
Copied
That means the only way to do this is to write an own plugin? COM and scripting won't do that, right?
What would be the next steps to get into it a little further?
The problem will be that the XMPie plugin is not documented at all for normal users like me.
Copy link to clipboard
Copied
Have you tried contacting their tech support?
Harbs
Copy link to clipboard
Copied
Yes, of course. They say there's no official API. I'm welcome to try but I get no support.
Copy link to clipboard
Copied
The correct (and I am pretty sure the only way) to do this would be for them to add scripting support to their
plugin. It is possible to add scripting support to only the particular part of the plugin that you need. If it is worth it you can hire them to add scripting support for the particular function of their plugin you need (if they are willing and able to do it).
Copy link to clipboard
Copied
When you say "action" do you mean some menu item's associated action?
I've recently posted the following snippet in a different thread:
(function(){
var m = app.menus.itemByName("$ID/Main").submenus.itemByName("$ID/&File");
$.writeln(m.menuItems.everyItem().name);
var mi = m.menuItems.itemByName("$ID/File Information...");
var a = mi.associatedMenuAction;
a.invoke();
})();
Somewhere deep in the examples there is a script that dumps all menu and action names.
Btw, the $.writeln output of above goes into the "JavaScript Console" panel of ESTK!
Another, desparate move would be to fire off system events using OS specific scripting, this way move the mouse, click and press keys.
Dirk
Copy link to clipboard
Copied
This won't work, sorry. The palette cannot be controlled through the menus... except showing/hiding it.
I got the same idea with system events. It would be great to have a program that sniffs system events and gives information when I press a special button in the InDesign palette. The 3rd party plugin should be a kind of library like DLL that exports functions. Does anybody know a program that can monitor InDesign.exe with all its sub-processes, DLL handles and called DLL functions?
[Edit:] I tried a DLL viewer which can open and show XMPie's plugin files XMPBackEnd5.apln and XMPFrontEnd5.apln (APLN = InDesign PlugIn). They seem to be normal DLL files. If anybody knows the secrets of "decrypting" DLLs it would be nice to know if this can help me. I need to invoke the plugin's commands for XMPie's "Dynamic Print" (new dialog opens) and then just confirm with "OK" to start the export.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now