Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • in reply to: Loop through pages, loop through files #6441

    i figured it out

    Code:
    var sourceFolder = Folder(PathToPDF);

    var files = sourceFolder.getFiles();

    for (var i = 0; i < docLength; i++) { // alert(myPages[i].name); var parPage = myPages[i]; for (var j = 0; j < files.length; j++) { var rects = parPage.rectangles.everyItem().getElements(); rects[0].place(files[i]); break; } }

    in reply to: Object Styles and Object Layer Options #6406

    got it working…

    Code:
    var myDocument = app.activeDocument;
    var docLength = myDocument.pages.length;
    var myPages = myDocument.pages

    for (var i = 0; i < docLength; i++) { var labelPlaceholder = myPages[i].allGraphics; var labelArtwork = labelPlaceholder[0]; var artworkLayers = labelArtwork.graphicLayerOptions.graphicLayers; artworkLayers[0].currentVisibility = true; }

    in reply to: Object Styles and Object Layer Options #6405

    after playing around i made progress….

    Code:
    var myDocument = app.activeDocument;
    var docLength = myDocument.pages.length;
    var myPages = myDocument.pages

    for (var i = 0; i < docLength; i++) { var labelPlaceholder = myDocument.allGraphics; var labelArtwork = labelPlaceholder[0]; var artworkLayers = labelArtwork.graphicLayerOptions.graphicLayers; // artworkLayers.item("Die Copy").currentVisibility = true; // alert(artworkLayers.length) artworkLayers[0].currentVisibility = true; }

    this works at communicating with the pdf layers, not i just need to loop through each page and do the same thing to each pdf on each page.

    in reply to: Object Styles and Object Layer Options #6404

    so far i’ve been trying to mess around with this

    Code:
    var myDocument = app.activeDocument;
    var docLength = myDocument.pages.length;
    var myPages = myDocument.pages

    for (var i = 0; i < docLength; i++) { alert("hello") var labelPlaceholder = myDocument.allGraphics; var labelArtwork = labelPlaceholder[0]; var artworkLayers = labelArtwork.graphicLayerOptions.graphicLayers; artworkLayers.item("Die Copy").currentVisibility = true; }

    i keep getting Object is Invalid on the currentVisability line

    in reply to: Object Styles and Object Layer Options #6402

    Does document layers also affect layers in a linked document?

    for example – i have a illustrator file that i have placed on a page. i right click on the illustrator link and select Object Layers Options. This brings up the illustrator file layers and i can turn on or off different layers to this illustrator file. Now lets say i have 10 indesign pages, each page has a linked illustrator file with an assigned object style “Artwork”.

    Is it possible to write a script that will look for any object style name Artwork within the indesign document, and turn on or off a specific layer to the illustrator file?

    in reply to: Connecting function to specific group in dialog box #6331

    right now i have this script working good, but it only effects the pages in the layout, not the master page. is there a way to have it effect the master page?

    below is the function i call. Is it possible to change Document to MasterPage or something like that?

    Code:
    function myOpenFunction(myEvent){

    if(myEvent.target instanceof Document){

    in reply to: Object Styles and Object Layer Options #6400

    im still confused at how to write all this up so that it will turn off a layer within the Object Layer Options window

    in reply to: Object Styles and Object Layer Options #6398

    I was thinking the same thing but couldn’t figure out the proper syntax.

    Does the script you provided turn on all the layers for the Object Layer Options?

    I’ve seen some stuff about graphicLayers.GraphicLayerOptions but im just not sure whats the right syntax and how to write it out.

    in reply to: Connecting function to specific group in dialog box #6330

    i figured it out. i just made an if statement for every radio button. if the value is true, then make that layer show

    Code:

    if(dialog.show()==1){

    var customer = myEvent.target.textFrames.itemByName(“customer name”);
    customer.contents = customerInput.text

    if(unwind1.value == true){
    myEvent.target.layers.itemByName(“Unwind 1”).visible = true;
    var unwind1layer = myEvent.target.layers
    }

    if(unwind2.value == true){
    myEvent.target.layers.itemByName(“Unwind 2”).visible = true;
    var unwind2layer = myEvent.target.layers
    }

    if(unwind3.value == true){
    myEvent.target.layers.itemByName(“Unwind 3”).visible = true;
    var unwind3layer = myEvent.target.layers
    }

    if(unwind4.value == true){
    myEvent.target.layers.itemByName(“Unwind 4”).visible = true;
    var unwind4layer = myEvent.target.layers
    }
    }

    in reply to: AfterOpen Script #6329

    yeah i used it to make a dialog box. it wouldn’t work at first but after messing around with it i finally got it to work. thanks again for your help

    in reply to: AfterOpen Script #6327

    i went down a rabbit hole that is over my head.

    how would i make a dialog window pop up within this function? i got an alert that tells me the document name, but im trying to get a dialog to pop up as well. would that happen within the myOpenFunction? would it call on another script?

    in reply to: AfterOpen Script #6326

    yes this is what i needed. thanks for the help

    in reply to: Get Text Variable #6315

    yeah that is what i was afraid of. I did mess around with some stuff and basically converted all text in specific paragraph style to a static text. then i can edit the text and remove the file extension. then using your export script, export using the paragraph style setting. thanks for the reply

Viewing 13 posts - 1 through 13 (of 13 total)