Current Position:Home > JS: Persistent Modeless Dialog

JS: Persistent Modeless Dialog

Update:11-30Source: network consolidation
Advertisement
I am trying to make a modeless dialog box for InDesign, but for some reason the dialog always closes after the script runs (i.e. I see the dialog for a brief second until the script finishes running, then it's gone). I cannot get it to persist. I need to be able to edit a document while the dialog is open. Any suggestions?
I am using the ScriptUI classes to create a dialog with the property 'palette'.

The Best Answer

Advertisement
I tried that, still the same. I can put that at the beginning of the script, right? Along with my application target?
Example:
#target InDesign
#targetengine "session"
Here is my whole script (don't laugh too hard, I am still trying to figure this out ):
#target InDesign
#targetengine "session"
function closeWindow(){
     posWin.close();
var posWin = new Window(
     'palette',
     'Position the Image',
     undefined, {
          resizable: false,
          closeButton: true,
          maximizeButton: false,
          minimizeButton: false,
          independent: false,
          borderless: true
posWin.location = [0, 0];
posWin.info = posWin.add('panel', undefined, undefined);
posWin.action = posWin.add('panel', undefined, undefined);
posWin.action.orientation = 'row';
posWin.action.prevMaterialBtn = posWin.action.add('button', undefined, '<-- Previous Material');
posWin.action.cancelBtn = posWin.action.add('button', undefined, 'Cancel');
posWin.action.cancelBtn.onClick = closeWindow;
posWin.action.nextMaterialBtn = posWin.action.add('button', undefined, 'Next Material -->');
// This function will call an instance of a template, delete the link to the current photo, replace it with a new photo and then wait for an onClick (or some other) event.
// It will then write the information to the XMP, close the template and open the next template.
posWin.show();
  • JS: Persistent Modeless Dialog Update:11-30

    I am trying to make a modeless dialog box for InDesign, but for some reason the dialog always closes after the script runs (i.e. I see the dialog for a brief second until the script finishes running, then it's gone). I cannot get it to persist. I nee

  • Modeless Dialog Box Not Displaying Contents Update:10-11

    I have created a simple modeless dialog box. Although the dialog box and title appear, the contents (a label) do not appear. The dialog box does display correctly if the dialog box is switched to a modal box. I got into this problem because I also ca

  • Help !modeless  dialog in acrobat 9.0 Update:10-11

    I want to know how to create a modeless dialog in acrobat 9.0 PRO?   ADM has already been removed from the acrobat 9.0? According to  the javascript reference,i can only create modal dialog boxes.help!thanksYou can't. As you read, JS dialog windows i

  • Modeless dialogs and the active document Update:10-11

    I have a modeless dialog (Qt) that contains a checkbox to toggle off and on annotations that our plugin draws.  When the user clicks the checkbox, it calls a function in the plugin code that ultimately makes a call to AIAnnotator->SetAnnotatorActive(

  • Whatever happened to Alt+F6 (to switch between modeless dialogs)? Update:11-30

    In all versions of Windows until Vista (I think that was when it went missing) you used to be able to press the standard defined accelerator Alt+F6 to switch between an application's main window and any modeless dialogs it had. It's still documented

  • How to create a modeless dialog using commandlink Update:11-30

    i want to create a modelessdialog using commandlink. and my code is <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefi

  • ScriptUI tab through the fields in a modeless dialog (IDCS4ME) Update:11-30

    Hi, I've made a dialog with ScriptUI, a "palette" i.e., modeless. I'd like the user to be able to press the Tab key and shift through the various text input fields etc. But instead, the Tab key hides the InDesign panels even when the dialog has

  • Modeless dialogs Update:11-30

    Hi, I am developing under Windows XP, SP2, all updates installed. When I run the program below, the modeless dialog disappears after a few seconds when I click into the parent frame. Obviously the frame repaints and ignores the dialog. But the dialog

  • Can i create ADM Modeless dialog using Photoshop CS5 SDK Update:11-30

    Hi, I am developing a photoshop plugin using CS3 SDK. I am using ADM to create dialogs. Developing ADM Modeless dialog is not possible in CS3 SDK. Can any one please tell me whether it is possible in CS5 SDK to create Modeless dialog. ( So that user

  • How to create modeless dialog? Update:11-30

    Hi, Any body tell me how to create the modeless dialog??From your y'day's post... See to the VI Properties for what I ve changed. - Partha LabVIEW - Wires that catch bugs! Attachments: MainVI.vi ‏18 KB SubVI.vi ‏12 KBRead other 7 answers