Copy link to clipboard
Copied
The exact same script -- run from inside ID the palette floats on top as expected.
launched from the command line --using
p=app.scriptPreferences.scriptsFolder;
var argArray = [0, 0];
var myFile = new File(p+"/AddScript.jsx");
if (myFile.exists) {
try{
app.doScript(myFile, ScriptLanguage.javascript, argArray);
}catch(e){alert(e);}
} else {
alert ("does not exist");
}
the palette created in AddScript.jsx appears BEHIND InDesign.
I assumed app.doScript would be run by ID, not the ASTK -- is this assumption wrong?
I guess that's a bug. Saw exactly this behavior before.
What's your InDesign version? What version of OS X exactly?
Regards,
Uwe
Copy link to clipboard
Copied
akiva_atwood wrote
… the palette created in AddScript.jsx appears BEHIND InDesign.
That's very interesting.
Thank you for sharing this issue.
What's your version of InDesign?
Hm, are you on Mac OS X ?
I saw something like that in some older versions of InDesign CC. Could be a bug.
But never in CS6 or below.
Regards,
Uwe
Copy link to clipboard
Copied
I'm on a Mac.
It creates the palette on top -- but as soon as I click on inDesign it moves behind. I'm guessing it's not registering with ID's window manager properly.
Copy link to clipboard
Copied
I guess that's a bug. Saw exactly this behavior before.
What's your InDesign version? What version of OS X exactly?
Regards,
Uwe
Copy link to clipboard
Copied
Is there any reason why you would want to run your palette through doScript ?
Just include the code delaing with UI at some point and call it when needed ?
UI.jsinc
#targetengine 'myPalette'
var w = new Window…
Main.jsx
#include "UI.jsinc"
w.show()…
No ?
Copy link to clipboard
Copied
I'm working on a plugin for the Elgato Stream Deck to allow running scripts by name from their external key pad. (instead of making shortcuts)
The alternative to using doScript is writing a startup script that opens a socket between the deck and indesign...
Copy link to clipboard
Copied
Ok, plugin, you mean CEP or pure C++ ?
Copy link to clipboard
Copied
A plugin for the stream deck.
ID would have a startup script
Copy link to clipboard
Copied
Using 2018 and Mojave (both latest updates)
Copy link to clipboard
Copied
Can you say what you mean by "launched from the command line"
Thanks.
P.
Copy link to clipboard
Copied
• What if you specifically #target indesign?
• Do you set myWin.active=true at some point?
(Please, keep us informed if you find any workaround.)
@+
Marc
Find more inspiration, events, and resources on the new Adobe Community
Explore Now