Pourquoi InDesign perd toute capacité de clavier si une palette ScriptUI est ouverte?

StackOverflow https://stackoverflow.com/questions/8860303

  •  28-10-2019
  •  | 
  •  

Question

Salvete! J'ai un simple script InDesign pour afficher une fenêtre de la palette. Le problème est, quand j'afficher cette fenêtre, ou toute autre palette ScriptUI, InDesign perd tout le focus du clavier - Je ne peux pas taper quoi que ce soit. Il est comme si les Eats palette de script tout mon entrée du clavier.

Voici le plus simple script:

#targetengine session;    //I have tried without this line, too.
var PaletteWindow = new Window('palette', "Test");
PaletteWindow.show();

Am quelque chose que je manque? Quelqu'un d'autre a-t-il vu ce problème? J'utilise InDesign CS4 sur XP Pro SP3; Dell Precision T3400 avec Core Duo; 4 Mo de RAM.

Voici le lien vers mon poste à InDesignSecrets: http: / /indesignsecrets.com/forum/indesign-add-ons-scripts-scripting-and-plug-ins/scriptui-palette-breaks-keyboard#p8419

Était-ce utile?

La solution

Ah, I figured I could answer my own question after four months. This link is to a thread with the same problem where the palettes steal keyboard focus. It does not contain a definitive solution, but does offer a workaround:

http://forums.adobe.com/thread/288782?start=0&tstart=0

Here is another workaround: Since the palette is supposed to "do something" and then return focus to IND, then add:

app.activate();

to the function call for the button. That way, after you push the button, you can work normally in IND.

This works fine, except that anytime you move the mouse over the palette, it sets focus to the application. This solution is a workaround for CS4.

[update] Now I am using CS5, and I find that it is no longer necessary to do this. It seems the problem was a bug in the CS4 UI scripting interface.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top