Back

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

Forum Replies Created

Viewing 11 posts - 31 through 45 (of 340 total)
  • Author
    Posts
  • in reply to: Script to spell out state names not working in CC #86880
    Ari Singer
    Member

    Does your document have the “scholarship winner” paragraph style applied?

    Try this:

    //DESCRIPTION:Expand US State Abbreviations
    
    app.doScript(doReplace, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Expand State Abbreviations");
    function doReplace ()
    {
    var a;
    var abbrevs = [
    [ "Alabama", "Ala." ],
    [ "Arizona", "Ariz." ],
    [ "Arkansas", "Ark." ],
    [ "California", "Calif." ],
    [ "Colorado", "Colo." ],
    [ "Connecticut", "Conn." ],
    [ "Delaware", "Del." ],
    [ "District Of Columbia", "D.C." ],
    [ "Florida", "Fla." ],
    [ "Georgia", "Ga." ],
    [ "Illinois", "Ill." ],
    [ "Indiana", "Ind." ],
    [ "Kansas", "Kan." ],
    [ "Kentucky", "Ky." ],
    [ "Louisiana", "La." ],
    [ "Maryland", "Md." ],
    [ "Massachusetts", "Mass." ],
    [ "Michigan", "Mich." ],
    [ "Minnesota", "Minn." ],
    [ "Mississippi", "Miss." ],
    [ "Missouri", "Mo." ],
    [ "Montana", "Mont." ],
    [ "Nebraska", "Neb." ],
    [ "Nevada", "Nev." ],
    [ "New Hampshire", "N.H." ],
    [ "New Jersey", "N.J." ],
    [ "New Mexico", "N.M." ],
    [ "New York", "N.Y." ],
    [ "North Carolina", "N.C." ],
    [ "North Dakota", "N.D." ],
    [ "Oklahoma", "Okla." ],
    [ "Oregon", "Ore." ],
    [ "Pennsylvania", "Pa." ],
    [ "Rhode Island", "R.I." ],
    [ "South Carolina", "S.C." ],
    [ "South Dakota", "S.D." ],
    [ "Tennessee", "Tenn." ],
    [ "Vermont", "Vt." ],
    [ "Virginia", "Va." ],
    [ "Wash.", "Washington" ],
    [ "West Virginia", "W.Va." ],
    [ "Wisconsin", "Wis." ],
    [ "Wyoming", "Wyo." ] ];
    
    app.findGrepPreferences = app.changeGrepPreferences = null;
    for (a in abbrevs)
    {
    	app.findGrepPreferences.findWhat = "b" + abbrevs[a][1] + "b";
    	app.changeGrepPreferences.changeTo = abbrevs[a][0];
    	app.findGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyles.item("scholarship winner");
    	app.activeDocument.changeGrep();
    	}
    app.findGrepPreferences = app.changeGrepPreferences = null;
    }
    

    If it does still not work, please spell me out the error that pops up.

    -Ari

    in reply to: Color Label Keyboard Shortcut? #86869
    Ari Singer
    Member

    The pageColor attribute works on a single page basis, and a spread consists of two pages. So you have to apply the color to each page individually. Here it is:

    app.activeWindow.activeSpread.pages[0].pageColor = app.activeWindow.activeSpread.pages[1].pageColor = UIColors.CUTE_TEAL;
    
    in reply to: Small caps in Kindle apps on iDevices #86651
    Ari Singer
    Member

    Not an EPUB expert, but try using ‘real’ small-caps (that is, from an Open-Type font).

    in reply to: Cross-references making the line beak poorly. #86547
    Ari Singer
    Member

    Are you sure this is not just the regular Paragraph Composer as opposed to the Single Line Composer?

    Ari Singer
    Member

    Here’s the fixed script so that it pops up a dialog on each individual item when 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];
    			app.select(bottomObject);
    			var paths = bottomObject.pageItems.item(0).clippingPath.photoshopPathNames;
    			var myDialog = app.dialogs.add({name:"Select PSD Clipping Path", canCancel:true});
    			with (myDialog) {
    				with(dialogColumns.add()) {
    					with(dialogRows.add()) {
    						staticTexts.add ({staticLabel:"Select the clipping path that you want:"});
    						with(dialogRows.add()) {
    							var myPathDdl = dropdowns.add({minWidth:100});
    							myPathDdl.stringList = paths;
    							myPathDdl.selectedIndex = 0;
    							}
    						}
    					}
    				}
    
    			if (myDialog.show() == true)
    			{
    				var topObject = bottomObject.duplicate();
    				bottomObject.transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
    				topObject.pageItems.item(0).clippingPath.appliedPathName = topObject.pageItems.item(0).clippingPath.photoshopPathNames[myPathDdl.selectedIndex];
    				topObject.pageItems.item(0).clippingPath.clippingType = ClippingPathType.PHOTOSHOP_PATH;
    				bottomObject.pageItems.item(0).clippingPath.clippingType = ClippingPathType.NONE;
    				var myGroup = bottomObject.parent.groups.add ([bottomObject, topObject]);
    				app.select(myGroup);
    				myDialog.destroy();
    				}
    			}
    			catch (myError) {}
    			}
    		}
    
    in reply to: Text Boxes #86496
    Ari Singer
    Member

    You probably have “Show Text Threads” turned on. Go to View > Extras > Hide Text Threads to turn it off.

    in reply to: How Can I Tame Bullets in Split Columns? #86473
    Ari Singer
    Member

    He meant that in the Paragraph Keep Options there’s an option to set up so that this paragraph always starts in a column.

    in reply to: Style Palletts: Can I make'em larger? #86451
    Ari Singer
    Member

    Yeah, have to same issue on my 4K display.

    There’s not a solution to that (Adobe fixed it ‘somewhat’ in the latest update), but first make sure that Ui scaling is set up correctly. Go into the InDesign preferences, then under the UI Scaling tab, and make the For High-PPI Displays.. is checked. And restart the app.

    in reply to: DIN Font problem #86450
    Ari Singer
    Member

    I’m not a font whiz but not all font formats are cross-platform. It’s very possible that Postscript Type 1 is not supported on a mac. A solution would be to convert it to OpenType. format.

    Ari Singer
    Member

    This should work:

    //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;
        // Capture all the paths from the selected PSD
        try {
            var paths = mySelections[0].pageItems.item(0).clippingPath.photoshopPathNames;
            var myDialog = app.dialogs.add({name:"Select PSD Clipping Path", canCancel:true});
            with (myDialog) {
                with(dialogColumns.add()) {
                    with(dialogRows.add()) {
                        staticTexts.add ({staticLabel:"Select the clipping path that you want:"});
                        with(dialogRows.add()) {
                            var myPathDdl = dropdowns.add({minWidth:100});
                            myPathDdl.stringList = paths;
                            myPathDdl.selectedIndex = 0;
                            }
                        }
                    }
                }
            }
        catch(myError) {
            alert("Make sure it's a PSD");
            exit();
            }
        
        if (myDialog.show() == true) {
            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[myPathDdl.selectedIndex];
                        topObject.pageItems.item(0).clippingPath.clippingType = ClippingPathType.PHOTOSHOP_PATH;
                        bottomObject.pageItems.item(0).clippingPath.clippingType = ClippingPathType.NONE;
                        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");
                    }
                }
            }
        myDialog.destroy();
        }
    
    Ari Singer
    Member

    If I understand correctly, you want to be able to select which Photoshop path to use from the original file, correct?

Viewing 11 posts - 31 through 45 (of 340 total)