Forum Replies Created
-
AuthorPosts
-
Ari Singer
MemberDoes 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
Ari Singer
MemberThe
pageColorattribute 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;
Ari Singer
MemberNot an EPUB expert, but try using ‘real’ small-caps (that is, from an Open-Type font).
Ari Singer
MemberAre you sure this is not just the regular Paragraph Composer as opposed to the Single Line Composer?
July 14, 2016 at 6:13 pm in reply to: Apply Multiply Effect and Clipping Path then Group images. #86534Ari Singer
MemberHere’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) {} } }Ari Singer
MemberYou probably have “Show Text Threads” turned on. Go to View > Extras > Hide Text Threads to turn it off.
Ari Singer
MemberHe meant that in the Paragraph Keep Options there’s an option to set up so that this paragraph always starts in a column.
Ari Singer
MemberYeah, 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.
Ari Singer
MemberI’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.
July 11, 2016 at 7:43 pm in reply to: Apply Multiply Effect and Clipping Path then Group images. #86449Ari Singer
MemberThis 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(); }July 11, 2016 at 7:03 pm in reply to: Apply Multiply Effect and Clipping Path then Group images. #86446Ari Singer
MemberIf I understand correctly, you want to be able to select which Photoshop path to use from the original file, correct?
-
AuthorPosts
