Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 15 posts - 166 through 180 (of 344 total)
  • Author
    Posts
  • in reply to: Puzzlify CC2015 #85101
    Ari Singer
    Member

    It seems to be working by me. Be aware, I think it’s an Illustrator script, not InDesign. Try it in AI.

    Ari Singer
    Member

    My pleasure, Masood.

    I would advise you to use the second version of the script. It works just like the first, but it can also handle multiple selections at once.

    BTW, for extra efficiency, assign a keyboard shortcut to the script.

    Enjoy!

    Ari Singer
    Member

    I modified the script a bit, so it should work individually even when multiple graphics are selected.

    //Ari S. - designerjoe@outlook.com
    app.scriptPreferences.enableRedraw = false;
    // 'Undo' will undo the entire script
    app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Image Manipulation Script");
    
    function main(){
        // Capture the current selections in array
        var mySelections = app.selection;
        for (var i = 0; i < mySelections.length; i++) {
            try{
                var bottomObject = mySelections[i];
                var topObject = bottomObject.duplicate();
                bottomObject.transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
                try {
                    topObject.pageItems.item(0).clippingPath.appliedPathName = topObject.pageItems.item(0).clippingPath.photoshopPathNames[0];
                    topObject.pageItems.item(0).clippingPath.clippingType = ClippingPathType.PHOTOSHOP_PATH;
                    try {
                        var myGroup = bottomObject.parent.groups.add ([bottomObject, topObject]);
                        app.select(myGroup);
                        }
                    catch (myError) {
                        // If it can't group
                        alert("could not group successfully");
                        }
                    }
                catch (myError) {
                    // If it can't apply the Photoshop path then it obviously does not have one
                    alert("Selected image does not have a Photoshop path applied")
                    }
                }
            catch (myError){
                // If it can't duplicate the object or apply multiply then it's obviously not a graphic frame
                alert("Make sure you selected a graphic frame");
                }
            }
        }
    
    Ari Singer
    Member

    Here you go!

    I understood that the top image has to stay with the regular blending mode and not multiply, am I correct? Becuase this is how I wrote the script:

    //Ari S. - designerjoe@outlook.com
    app.scriptPreferences.enableRedraw = false;
    app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Image Manipulation Script");
    
    function main(){
        try{
            var mySelection = app.selection[0];
            var bottomObject = mySelection;
            var topObject = bottomObject.duplicate();
            bottomObject.transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
            try {
                topObject.pageItems.item(0).clippingPath.appliedPathName = topObject.pageItems.item(0).clippingPath.photoshopPathNames[0];
                topObject.pageItems.item(0).clippingPath.clippingType = ClippingPathType.PHOTOSHOP_PATH;
                try {
                    var myGroup = bottomObject.parent.groups.add ([bottomObject, topObject]);
                    app.select(myGroup);
                    }
                catch (myError) {
                    alert("could not group successfully");
                    }
                }
            catch (myError) {
                alert("Selected image does not have a Photoshop path applied")
                }
            }
        catch (myError){
            alert("Make sure you selected a graphic frame");
            }
        }
    

    G’luck!

    Ari Singer
    Member

    Will probably have it ready for today.

    Ari Singer
    Member

    This can definitely be done. If I’ll have an extra moment I’ll try to do something for you.
    G’luck!

    in reply to: Multiple Cross References #85058
    Ari Singer
    Member

    I can try writing a script if it’s possible, but I’m unfamiliar with the Cross-References workflow in InDesign as I never used it. So if you don’t mind to upload to Drive or DropBox a page or two so that I can look into it.

    in reply to: right alignment #85050
    Ari Singer
    Member

    I believe there’s a standard tab character between the name and the phone number, but in MS Word the ‘tab stop’ was set up on the ruler to be right aligned. But when it’s imported to InDesign, it regards it as a standard tab character and treats at such. So the solution would be to use GREP to find any tab character that precedes a phone number, and replace it with a right-aligned tab.

    P.S. I don’t know what the format of your telephone numbers are and therefore the GREP expression cannot be too specific, so I assume that you don’t have any other lines that contains a tab with a digit following it. If you do, then this will change that tabs as well, which you probably do not want. Unless of course you tell me the format of your telephone numbers, and I can write a more specific expression.

    Following are the GREP FInd/Change settings:

    Find What: (?=\d)
    Change To: ~y

    in reply to: Color and B/W versions of layout #85002
    Ari Singer
    Member

    If you insist on converting the imaes to grayscale in Photoshop you can take this approach:

    Place all original color images in a folder (and name it something like ‘color images’).

    Whenever you convert an image to grayscale in Photoshop, save it to a separate folder (called ‘b&w images’). But here’s the catch: Leave the file name of the image intact! So for example, if the original image’s file name is ‘background2.jpg’ then the converted grayscale image should have the exact same file name (‘background2.jpg), but saved in the ‘b&w images’ folder.

    And here’s the cool part. When you place the images into the document, select it from the ‘color’ folder, So all the images in the document will be color. Then you can export it to epub. When when you’re ready to export to pdf do the following: In the Links panel select all the image links that you want to change to grayscale, in the panel flyout menu select ‘Relink to Folder’, and browse and select the ‘b&w images’. In a second all the images will change to the grayscale version. To switch back to the color version you do the same but now you choose the ‘color images’ folder.

    in reply to: Two independent text boxes with anchored object #84996
    Ari Singer
    Member

    This happens because a text frame does not honor any text wrap from a frame that is anchored in another frame. So in your case, the text wrap works correctly in the frame that is it anchored to but not in the adjacent frame. There might be a better solution, but I’m afraid you’ll have to ‘release’ the anchor and leave it as a free-flowing text frame.

    in reply to: GREP help! Ignore 2nd Tab? #84976
    Ari Singer
    Member

    The following GREP expression is much more robust as it finds the first instance of a tab in a sentence regardless of how many tabs follow it. Because Skemicle’s expression (as he noted himself) only works if you have exactly two tabs in the paragraph. if there’s only one, or more than two it doesn’t work they way it should. Plus, if you have two tabs consecutively (highly unlikely, but still…) it won’t find either of them. But the following expression has none of those issues:

    Find What: (?!=*$)
    Change To:

    G’luck!

    in reply to: PDF woes with jagged-y text–help! #84974
    Ari Singer
    Member

    Unfortunately, I don’t have the solution to your problem, but I’m almost sure the culprit is the 93% transparency box that causes this issue. Is it covering the text? Is the text entered in this transparent box? These might cause it.

    Try on more thing. Trash your preferences (https://creativepro.com/rebuilding-indesign-preferences.php), then create a new document and copy and paste one page to the new doc and try creating a PDF from it. If this comes out fine, it might be a transparency setting that you inadvertently set up.

    Ari Singer
    Member

    Here you go, I’ve written this script for you. With the document that you want to package individually open, run this script. If it’s a large file it might take a few minutes because it basically makes a new document from every page, packages it, and deletes the temporary document. When done you’ll find a folder on your desktop with the name of your file, in it every page will have its own subfolder, with its files, images and fonts.

    If you don’t know how to save and run this script, look here: https://creativepro.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-post.php

    Following is the script:

    //created by Ari S. --  designerjoe@outlook.com
    // Package every page individually
    
    app.scriptPreferences.enableRedraw = false;
    var myDoc = app.activeDocument;
    var sourceTitle = myDoc.name;
    var myPages = myDoc.pages;
    for (i=0; i <myPages.length; i++){
        var currentSourcePage = myPages[i];
        if (currentSourcePage.pageItems.length==0) continue;
        var pageName = currentSourcePage.name;
        var sourceWidth = myDoc.documentPreferences.pageWidth;
        var sourceHeight = myDoc.documentPreferences.pageHeight;
        var sourceMaster = currentSourcePage.appliedMaster;
        var myNewDoc = app.documents.add();
        myNewDoc.documentPreferences.pageWidth = sourceWidth;
        myNewDoc.documentPreferences.pageHeight = sourceHeight;
        var myNewPage = myNewDoc.pages[0];
        currentSourcePage.duplicate(undefined, myNewPage);
        var newMaster = sourceMaster.duplicate(undefined, myNewDoc);
        var myNewPagesArray = myNewDoc.pages;
        for (j=myNewPagesArray.length - 1; j >=0; j--){
            if (myNewPagesArray[j].pageItems.length==0){
            myNewPagesArray[j].remove();
            }
        }
            myNewDoc.pages[0].appliedMaster = newMaster;
        if (currentSourcePage.side == PageSideOptions.leftHand){
            myNewDoc.documentPreferences.startPageNumber = 2;
            }
        createPackage(myNewDoc);
        }
    
    function createPackage(myNewDoc) {
        var targetFolder = new File("~/Desktop/" + sourceTitle +"/Page " + pageName + "/");
        var flag = Folder(targetFolder).create();
        
        // ------- HERE YOU CAN CHANGE ANY PACKAGING SETTING THAT YOU WANT. TRUE means 'ON', and FALSE means 'OFF': ---------
        var copyingFonts = true;
        var copyingLinkedGraphics = true;
        var copyingProfiles = true;
        var updatingGraphics = true;
        var includingHiddenLayers = true;
        var ignorePreflightErrors = true;
        var creatingReport = true;
        var includeIDML = true;
        var includePDF = false;
        var pdfStyle = "";
        var forceSave = true;
        var versionComments = sourceTitle + " " + "page " + pageName ;
    
        
        if ( flag === true){
            myName = "Page " + pageName;
            var garbageFolder = new File("~/Desktop/" + sourceTitle +"/Delete This Folder/");
            Folder(garbageFolder).create();
            myNewDoc.save(new File("~/Desktop/" + sourceTitle + "/Delete This Folder/" + myName + ".indd"))
            myNewDoc.packageForPrint (
            targetFolder, 
            copyingFonts, 
            copyingLinkedGraphics, 
            copyingProfiles, 
            updatingGraphics, 
            includingHiddenLayers,
            ignorePreflightErrors,
            creatingReport,
            includeIDML,
            includePDF,
            pdfStyle,
            versionComments,
            forceSave       
            );
            myNewDoc.close(SaveOptions.no);
            var myTempFiles = Folder(garbageFolder).getFiles();
            for (k=myTempFiles.length-1; k >=0; k--)
            myTempFiles[k].remove();
            Folder(garbageFolder).remove();
            }
        }
    

    Please let me know if it works.

    P.S. If you want to change any packaging settings (for ex. if you want to export an .idml as well) go to the lines below the line that says “Here you can change any packaging settings…”, and turn on or off any setting by setting it to true (on) or false (off) respectively.

    Ari Singer
    Member

    This can definitely be done with a script. If I’ll have some extra time on my hands I’ll try to create something.

    Ari Singer
    Member

    My pleasure! I find it’s best to use the ESTK when writing JS for Adobe apps.

Viewing 15 posts - 166 through 180 (of 344 total)