To select open documents

I try to open multiple documents and I wrote a script to switch between this document, I hope that you have completed

What I can do in the dialogue box to switch to the document that I chose

var no = 67494
var myActions = app.menuActions;
var w = new Window ("dialog");
var myList = w.add ("listbox");
for (var i = 0; i < app.documents.length; i++)
myList.add ("item", " " + String(myActions.itemByID(no++).name));
myList.preferredSize = [200,150];
w.add("button", undefined, "OPEN", {name: "ok"}).onClick = function() {
w.close(7);
}
if(w.show() == 7) {
if(myList.selection[0]) {
app.menuActions.itemByID(67494).invoke();
}
if(myList.selection[1]) {
app.menuActions.itemByID(67495).invoke();
}
}

This should do it:

#targetengine ttt
var w = new Window("palette");
var myList = w.add("listbox");
var docList=app.documents.everyItem().name.sort();
for (var i = 0; i < docList; i++) {
    var li = myList.add("item", +String(i + 1) + " " + docList[i]);
    li.doc = app.documents.item(docList[i]).getElements()[0];
}
myList.preferredSize = [200, 300];
w.show();  

myList.onChange = function() {
    if (myList.selection) {
        app.activeDocument = myList.selection.doc;
    }
};

Tags: InDesign

Similar Questions

  • Cannot open files or accessory by double-clicking, should use the right click and select 'Open' to see all attachments or open any document/photo/etc.

    I have all of a sudden, am more able to open anything in my library or by email by double left click on the item.  Now... I have to either save and open by selecting open or simply I am unable to use my computer to see anything which requires the opening.

    What is everything?  How to fix?

    There was a similar... in fact same post in Windows 8... but nobody will suggest reasonable fixes...

    Thanks if you can help...

    Right click, choose 'Open with', and then choose by default, which will fix it so that when you double-click on it uses the one you have chosen.

  • Cannot open documents with .cwk on the new imac

    I just upgraded my mini in an imac. I transferred via MIGRATION Asst. I discovered that I had a lot of documents with file extension .cwk. Since Appleworks 6 is no longer viable, I can't open documents. I would like to convert the docs. in PDF format, but can not find a way to do it. For any help or suggestion will be greatly appreciated.

    Try a .cwk file right-click and select "open with...". "Pages. If it works, you can do a right-click on the .cwk file, choose 'Get Info', in virtue to open it with, select Pages in the menu drop-down and check "use this application to open all documents like this.

  • I prefer SEPARATE (for multiple open documents) instead of tedious proceedings hover over the icon and then choose the one I want.

    Notepad or WORD or EXCEL, Lotus SAMETIME, I prefer SEPARATE (for multiple open documents) instead of tedious proceedings hover over the icon and then choose the one I want.  I can't figure out how to change that, and it's a boring true change to XP. Does anyone know how to do this?

    Go to the Start menu button, right-click on it, select Properties, click the task bar .

    Click the drop-down list buttons Taskbar & select never combine.

    That's all.  You should now see an entry of the separate taskbar for each open file on your PC.

  • open documents (or files) in the subfolders of the folder of my target

    Hi guys,.

    I'm new to javascript and I need help to open documents in subfolders of the folder of my target. There are several subfolders (subfolder 1 to 10 for example) contained in a folder ("Folder" in the script below). I want to open all the documents in a subfolder at a time and do something for these documents. Then close and open documents in a different subfolder (loop).

    I find a way to open documents that are directly under a folder. The problem is that I don't know how to open a document in the subfolder of a folder

    I need code that could do something like "getfolders" (but there is no such thing as 'getfolders') to the subfolder of 1 to 10 the number and loop through them to open documents.

    Could some please help me with the problem?

    This is where I am so far:

    #target photoshop

    Var folder = Folder.selectDialog ("select folder");

    If {(Folder)

    Uses of the var = theFolder.getFiles (/ \.) (jpg) | TIF | EPS | (psd) / $i);

    for (var m = 0; m < theFiles.length; m ++)

    {

    Open all documents in the folder

    var idOpn = charIDToTypeID ('Opn');

    var desc52 = new ActionDescriptor();

    var idnull = charIDToTypeID ("null");

    desc52.putPath (idnull, theFiles [m]);

    var ADI is charIDToTypeID ("As");.

    var idTIFF = charIDToTypeID ("TIFF");

    desc52.putClass (Adis, idTIFF);

    executeAction (idOpn, desc52, DialogModes.NO);

    ... do something for documents

    ... Save and close

    }

    }

    I finally get the correct script by combining small pieces from here and elsewhere

    After selecting the top folder, this script will go through each subfolder, one to a tim.e to open two files tif - that contain respectively the cy5 and texas. Then the script will superimpose the cy5 texas file file in a new RBG file and save it with a similar name that the file of texas except the overlay file will replace Texasred with overlay:

    #target photoshop

    app.bringToFront ();

    main(); call the main function

    main() {} function

    records of var = [];

    var topLevel = Folder.selectDialog("");  Select the superior folder

    if(topLevel == null) return; If you cancel to quit smoking

    records = FindAllFolders (topLevel, records);  call the FindAllFolders function

    Folders.unshift (topLevel);  Add new items at the beginning of an array

    for (var z = 0; z)< folders.length;="" z++){//="" loop="" through="" all="">

    List of files of the var = folders [z] .getFiles ("*.tif"); a list of all the hair in this subfolder

    for (var a = 0;< filelist.length;="" a+="">

    {//loop through all the files in the folder; 2 at a time

    If (fileList[a].name.match(/cy5/i)) {/ / the file must contain cy5}

    DocRef var = app.open (fileList [a])}; Open file

    If (fileList[a+1].name.match(/texas/i)) {/ / the file must contain Texas}

    var docref1 = app.open (fileList [a + 1]);} Open file

    * insert ' final script any overlay ", recorded by scriptistener

    Marker - Sep 17, 2016, 18:21:49

    // start=======================================================

    create a new custom RGB

    var idMk = charIDToTypeID ("Mk");

    var desc136 = new ActionDescriptor();

    var idNw = charIDToTypeID ('Nw');

    var desc137 = new ActionDescriptor();

    TSM var = charIDToTypeID ("Md");

    var idRGBM = charIDToTypeID ("RGBM");

    desc137.putClass (TSM, idRGBM);

    var idWdth = charIDToTypeID ("Wdth");

    var idRlt = charIDToTypeID ("#Rlt");

    desc137.putUnitDouble (idWdth, idRlt, 665.760000);

    var idHght = charIDToTypeID ("Hght");

    var idRlt = charIDToTypeID ("#Rlt");

    desc137.putUnitDouble (idHght, idRlt, 498.720000);

    var idRslt = charIDToTypeID ("Rslt");

    var idRsl = charIDToTypeID ("#Rsl");

    desc137.putUnitDouble (idRslt, idRsl, 150.000000);

    var idpixelScaleFactor = stringIDToTypeID ("pixelScaleFactor");

    desc137.putDouble (idpixelScaleFactor, 1.000000);

    idFl var = charIDToTypeID ("Fl");

    idFl var = charIDToTypeID ("Fl");

    var idBckC = charIDToTypeID ("BckC");

    desc137.putEnumerated (idFl, idFl, idBckC);

    var idDpth = charIDToTypeID ("Dpth");

    desc137.putInteger (idDpth, 16);

    var idprofile = stringIDToTypeID ('profile');

    desc137.putString (idprofile, "sRGB IEC61966 - 2.1");

    var idDcmn = charIDToTypeID ("Dcmn");

    desc136.putObject (idNw, idDcmn, desc137);

    executeAction (idMk, desc136, DialogModes.NO);

    end of the new creation of file marker - Sep 17, 2016, 18:22:19

    // start=======================================================

    perform the action for recovery

    var idPly = charIDToTypeID ('folds');

    var desc138 = new ActionDescriptor();

    var idnull = charIDToTypeID ("null");

    var ref90 = new ActionReference();

    var idActn = charIDToTypeID ('Actn');

    ref90.putName (idActn, "Overlay");

    var idASet = charIDToTypeID ("ASet");

    ref90.putName (idASet, "Default Actions");

    desc138.putReference (idnull, ref90);

    executeAction (idPly, desc138, DialogModes.NO);

    end overlay action marker - Sep 17, 2016, 18:24:08

    // start=======================================================

    Save the overlay file

    var idsave is charIDToTypeID ('save');.

    var desc139 = new ActionDescriptor();

    var ADI is charIDToTypeID ("As");.

    var desc140 = new ActionDescriptor();

    var idBytO = charIDToTypeID ("selonPour");

    var idPltf = charIDToTypeID ("Pltf");

    var idMcnt = charIDToTypeID ("Mcnt");

    desc140.putEnumerated (idBytO, idPltf, idMcnt);

    var idTIFF = charIDToTypeID ("TIFF");

    desc139.putObject (Adis, idTIFF, desc140);

    Marie Salomé var is charIDToTypeID ('In');.

    var name = list of files [a + 1].name.replace ("Texasred", "Overlay"); Rename the new file to overlay RGB

    desc139.putPath (Marie-Salomé, new file (files [z] + ' / ' + name));

    var idLwCs = charIDToTypeID ("LGD");

    desc139.putBoolean (idLwCs, true);

    executeAction (idsave, desc139, DialogModes.NO);

    end of file save marker - Sep 17, 2016, 18:26:43

    // start =======================================================

    Close all files

    var idCls = charIDToTypeID ("Cls");

    executeAction (idCls, undefined, DialogModes.NO);

    // =======================================================

    var idCls = charIDToTypeID ("Cls");

    executeAction (idCls, undefined, DialogModes.NO);

    // =======================================================

    var idCls = charIDToTypeID ("Cls");

    executeAction (idCls, undefined, DialogModes.NO);

    end of file closing marker - Sep 17, 2016, 18:27:43

    * end of the insertion of the script of any final overlay

    } //end filelist loop

    } //end loop of subfolders

    } //end main function

    function FindAllFolders (srcFolderStr, destArray) {}

    var fileFolderArray =. getFiles() folder (srcFolderStr);

    for (var i = 0; i)< filefolderarray.length;="" i++="" )="">

    var fileFoldObj = fileFolderArray [i];

    If (fileFoldObj instanceof File) {}

    } else {}

    destArray.push (Folder (fileFoldObj));  Add new items at the end of a table

    FindAllFolders (fileFoldObj.toString (), destArray);

    }

    }

    Return destArray;

    }

  • Set the zoom level for all open documents

    I work with 2,3,4,5 and 6 open documents in Photoshop CC 2015.1.1 at a time.

    What is the easiest way to create a script that gets the number of open documents and defines a specific zoom on all open documents level?

    Basic workflow

    1. select images in Bridge

    Images of BR 2 - open in Photoshop

    3 - Photoshop > > window > > mosaic all vertically

    4 - run script defined zoom level

    The script must treat all documents open that not only active in operating the scipt.

    If (! documents.length) alert (' there is no open documents.) ', ' No. 'Document');

    else {}

    var saveActiveDoc = app.activeDocument;

    for (var i = 0; i)

    app.activeDocument = documents [i];

    runMenuItem (app.charIDToTypeID ("ActP"));

    runMenuItem (app.charIDToTypeID ("ZmOt"));

    runMenuItem (app.charIDToTypeID ("ZmOt"));

    }

    app.activeDocument = saveActiveDoc;

    }

  • How to "go to a page in another document" without close the currently open document?

    I created a form that uses a button to switch to another pdf document. This second document is included in the first document as an attachment so that the whole package can be sent to people in a single document.

    It works well but the problem is that when the button is selected the document that is already open is closed (albeit with a backup invites document).

    There seems to be no way to keep the existing document open, while the second document (the linked document) is open.

    Is there a solution to this?

    Go to the properties of the button and change the action "go to a page view".

    you have created. The option "open in" Edit and put to 'new window '.

  • Script to copy layer in another open Document/group?

    Hi, I know that this topic has been covered several times before. But to clarify, here's what I asked:

    Copy the active layer/group into another document opened in Photoshop. The easiest way is to go to the «layer/double layer...» ». But it is very tedious. To begin with, when you choose this method and then select the document you want to copy in the menu drop-down, successfully, copy the layer/group for this document, but it is not auto-switch (unlock) in the document, he just copied in. You have to hit 'Ok', and then manually search through the open documents list via (window / * choose your document *) to get there. It is a nightmare when you try to do several times.

    Here's what I asked:

    It is possible to:

    (a) copy the active layer/group in the Clipboard/memory

    (b) switch to another document in Photoshop * via a personalized menu * which shows all existing documents

    (c) one time positioned on the new document, paste this layer/group from the Clipboard into this document

    .. is this possible?

    At the very least, is there scripts that anyone knows of that allows the user to switch between existing documents via a custom instead of going to the window menu / * choose your document *?

    Hi @boo radley 2013.

    do you mean something like this?

    // LayerPaste2anotherDoc.jsx
    // https://forums.adobe.com/thread/1496531
    
    // regards pixxxelschubser
    
    var aDoc = app.activeDocument;
    var AllDocs = app.documents;
    var actLay = aDoc.activeLayer;
    
    if (AllDocs.length > 1) {
    var itemDoc = null;
    actLay.copy ();
    
    var win = new Window("dialog","Copy the active layer");
    this.windowRef = win;
    win.Txt1 = win.add ("statictext", undefined, "Paste in which open document?");
    win.NewList=win.add ("dropdownlist", undefined, AllDocs);
    
    win.NewList.selection = 0;
    itemDoc = win.NewList.selection.index;
    
    win.cancelBtn = win.add("button", undefined, "Abbruch");
    win.quitBtn = win.add("button", undefined, "Ok");
    win.defaultElement = win.quitBtn;
    win.cancelElement = win.cancelBtn;
    win.quitBtn.onClick = function() {
    win.close();
    }
    
    win.NewList.onChange= function () {
        itemDoc = win.NewList.selection.index;
        return itemDoc;
        }
    
    win.show();
    
    app.activeDocument = app.documents[itemDoc];
    app.activeDocument.paste();
    app.refresh();
    } else {
        alert ("No other documents open")
        }
    

    Have fun

  • [JS CS3] First plan a selection of documents when others with the same name?

    I have a few scripts that are used to perform various operations on the current selection in InDesign. Under normal circumstances these work very well, but I can't seem to reliable get the document/selection of foreground when there is another document opened with the same name. Most of the references to the document and any reference to the selection, I've tried so far will simply lead to this document which was recently opened (and has the same name).

    app.activeDocument.fullName always return the path to the most recently opened document of the same name, but app.documents [0] .fullName returns the correct path. Try to get the selection well will always return the selection of the most recently opened document of the same name, regardless of the question of if I try app.selection, app.activeDocument.selection or app.documents [0] how. I also tried with getElements() [0] annexed to the document reference, but it makes no difference.

    My primary environment is still CS3 and the problem seems to be that it only references the documents by name. Short tests with CS5 indicate that this has been resolved by Adobe, probably because it now makes reference to documents using a default id. Haven't tried CS4 but its document object not having a property id guess it will behave the same as CS3. Is there a way to get around this, or is the best I can do to detect the problem (a simple app.activeDocument! = app.documents [0] comparison seems to work reliably) and refuse to run if encountered?

    The real problem is that the collections in the documents with the same name think to bad.

    The APID solution was trying to solve the problem, but because it was not the document reference that was broken, the patch did not help...

    Substances

  • Is it possible to import image files directly into an open document?

    Is it possible to import a series of image files, say jpegs, directly in an open document, rather than having to open all image files with drag-and - move each individual in the open document? Specifically, I'm a dentist and I often get sent to me by other offices digital x-ray images. But they come as 16 or 18 separate image files and I need to put them in a virtual "chest x-ray: mount", so I can see them all at once, rather than having to open all images and alternate between them. So I opened a blank document in PS (CS4), then I navigate to the folder that contains all the image files that I received, select all and open them all. In PS, I can now click on each tab of the image and drag the image into the void "montage" and close the image. This new image would then become its own layer in the document 'mount '. But I must repeat this 18 times for each patient. I thought that if there was a way to open the new document "mount" and then select all of the image files and 'import' somehow all image directly in the document - essentially "automate" - which would save me time and aggravation cargo! Anyone out there have any suggestions? Thank you very much!! Dr G.

    Yes, but after you have all your images as layers in a new document, that you can simply select all the layers of-> and then drag them to your document in one fell swoop.

  • Open Document icon missing IN Reqs but work for POs

    Hi all
    If there is point of sale and PO requests that are waiting for your approval. You would typically go to the purchase of super user-> summary of Notification-> task list, choose po/poreqs-> click Open the document to view/make changes before approval.

    Open Document link is woking when you open POs but lack of PO Reqs. I went through many documents such as (Metalink doc 356969.1). But without success. I think it's some kind of program installation/configuration/profile that needs to be changed.

    My problem is to get the missing icon for Reqs OP too. Anyone has any info please help me. I don't know where to look. Any help is greatly appreciated.

    Thank you
    Kalyan.

    Hello

    The icon of the Document in the page Details of Notification Workflow is shown depending on whether the function of the form is assigned to the current user (selected responsibility). You can run $FND_TOP/sql/wfmlrdbg.sql to identify the specific function of the shape associated with the formula IN Req and see if your current context has access to this function of the form.

    In other words, you can check if you see the icon when you access the same notification of responsibility iProcurement.

    I hope this helps.
    Vijay

  • I'm unable to open documents on my mac iCloud drive

    I'm having a problem where I am unable to open documents stored in iCloud drive on my MacBook Pro.  I already could solve this problem of disconnection and return in my iCloud desktop account.  This step doesn't work anymore.  When I try to open any file stored in iCloud, I get a message saying "the file _ could not be opened."

    Example: I opened the Pages.  When I try to open a file through this program, it will not be open.  If I try to open the file in the Finder, the same result happens.  This applies to the files of numbers and .pdf files.

    Hi mattfrompdc,

    Thank you for using communities Support from Apple!

    Looks like you are having some problems at the opening of documents stored in iCloud drive. If you do not already done, please go to iCloud.com and connect see if you are able to open the files there. If you are able to open the documents there, the next step would be to start the MacBook Pro in Mode safe and see if you can open documents from your iCloud drive it. A time tested, and then restart the MacBook Pro and try to access the iCloud drive as you normally would.

    See you soon!

  • I can't open documents sent to my email address

    I have Adobe reader and can open documents with the exception of any document sent to my email address at
    att.NET my email provider has tried repeatedly to find problems with the email account ect.
    with no will. My search engine is Mozilla firefox

    If you are in the AT & T Yahoo! platform?

    If so, you can run on a question that has plagued other Yahoo mail users, who has not been able to download attachments. This is especially a problem if you use an old favorite to access your e-mail, because Yahoo is not always correctly redirect on the currently preferred server.

    To find the best current address, try to access your mail through one of them:

    If you get to a working server, change your old bookmark for the new address.

    Some users have reported a different approach, which was to change to their Yahoo email settings basic messaging interface. I hope that won't be necessary.

  • By selecting 'Open in a new tab' right-click menu does nothing

    I just updated to firefox 24 on OXS. The right click menu now is meaningless.

    When I right click on a web link, and select 'Open in new tab', nothing happens. No tab opens.

    However, I see now countless options irrelevant for that link, such as 'copy the audio location', 'copy the location of the image', 'play', 'pause', etc., when the article I have clicking on is not an image, audio, video or any other type of media. The content of the right click menu is now longer than my entire screen, completely out of place for the link I'm clicking on and the only option that is relevant does nothing.

    How can I fix?

    I had the same problem. I found that disable Firebug in my Extensions menu solved the problem, so when I right click it appears the menu of standard options rather than the new options 100 or so which do not apply.

    If you have installed too much Firebug, you might want to give this a shot. I have not upgraded my Firebug in no time so it might be a problem with running an older version of it.

    Hope that helps

  • Cannot open 'Documents' because the original item cannot be found.

    By clicking on the sidebar in the finder, received the error of the object:

    Cannot open 'Documents' because the original item cannot be found.

    I spend a lot of stuff around recently because of a SIN that went down.  A lot of backups, transfers etc.

    Just as moving things to normal.

    Have all my backup files.

    If I go to users / #username "/ Documents I get the following:"

    Cannot open the 'Documents' folder because you don't have permission to view its contents.

    cmd - I do not show Panel permissions at all, just said I have unknown access.

    Finally, the fold icon has a small blue arrow in a white circle in the lower right corner.

    I am the only user and admin.

    Do you use a data service on the clouds that fits in the Finder, like "Dropbox" or "Google Reader?"

Maybe you are looking for