Forum Replies Created
-
AuthorPosts
-
Masood Ahmad
ParticipantCheck the keep options, please!
Masood Ahmad
ParticipantAmin, why don’t you use the “Away From Spine” Alignment under the “Indents and Spacing” pane of the Paragraph Style Options dialog box.
This alignment works fine, even if your para is running on 2 pages. It’s a simple thing and available in InDesign without extra penny.
I hope you don’t need a script for this, If I understood your request correctly.
Just give it a try…
Masood Ahmad
ParticipantMasood Ahmad
ParticipantHi Graham, The GREP wasn’t fully responsible for the effect, it was just helping to to do a small task. I’ll share the InDesign file by Tuesday, 17th October 2017 as I have given the same task to my colleagues (for fun). Let’s see what ideas they come up with :)
Masood Ahmad
ParticipantThat’s great :) I wouldn’t have done it much better than this.
Masood Ahmad
ParticipantAs I’ll be leaving shortly, I assume the text is as-is. Try this:
Step 1: This find/change should not be repeated throughout the document. Should be run once only.
GREP Find/Change:
Find What:(^Line \d\u.+\r)(^Line \d\u.+\r)(^Line \d\u.+\r)
Change to:$2$3$1Step 2: To apply style to the first line.
GREP Find/Change:
Find What:^Line \d\u.+\r(?=(^Line \d\u.+\r){2})
Change Format:Paragraph Style 2Let me know if this works for you :)
Masood Ahmad
ParticipantCan you give some live text or the paragraphs starts with “Line, space digit, Uppercase character, space and en-dash”.
Masood Ahmad
Participant@David,
I remember, we used to have a community where people feel proud by sharing solutions to the problems, but it seems we’re loosing that. I think if this is going to continue, we’ll loose the charm as well.
I have a suggestion, how about creating a separate page under the Forums section, just below the “Announcements”, https://creativepro.com/forums, name it “Request for Paid Scripts & Plugins”, And let all the money making guys sit there.
Sorry, but I’m not offending anyone. I said what I felt.
Masood Ahmad
ParticipantHi Paul, Can you send me your email ID so that I can send you the InDesign file with styles intact.
Masood Ahmad
ParticipantGreat :)
It seems the request is the toughest one, I haven’t seen a single reply on this.
Masood Ahmad
ParticipantAre the coders on vacation :)
Masood Ahmad
ParticipantThere was a discussion on this, just take a look at it:
https://creativepro.com/multi-level-automatic-numbering-in-indesign.php
https://creativepro.com/multilevel-numbering-like-2-0-1.phpNumbers don't restart after ANY previous level—only the immediately previous one
Masood Ahmad
ParticipantWow! I couldn’t believe, I’ve finally completed my scripts. Initially, it was a sort of challenge to me as I’m not a script writer, but it was interesting.
Here is my final code:
//Fake Duotone in InDesign
//Edited by: Masood Ahmad, 29th September 2017
//Original Script created by: Ari S. - designerjoe@outlook.comapp.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();
var midObject = bottomObject.duplicate();
//apply blending modes to all the three objects
topObject.transparencySettings.blendingSettings.blendMode = BlendMode.LUMINOSITY;
midObject.transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
bottomObject.transparencySettings.blendingSettings.blendMode = BlendMode.NORMAL;// Find Duotone swatch and apply the fill to the bottom object
var myDoc = app.activeDocument;
var mySwatches = myDoc.swatches;
var swatchesLength = mySwatches.length;
for (i=0;i<swatchesLength;i++) {
if (mySwatches[i].name == "duotone" || mySwatches[i].name == "Duotone") {
var duotoneSwatch = mySwatches[i];
bottomObject.fillColor = duotoneSwatch;
}
}// Check if Duotone swatch is defined, if not create and apply the fill to the bottom object
if (duotoneSwatch == undefined) {
//alert("Please create a Duotone swatch");
var myColor = myDoc.colors.add();
myColor.colorValue = [75,5,100,0];
myColor.name = "Duotone";
bottomObject.fillColor = myColor;
}//delete the image (content) from the bottom most object
myGraphics = bottomObject.allGraphics;
try {myGraphics[0].remove()} catch(_){}//group all the three objects.
try {
var myGroup = bottomObject.parent.groups.add ([bottomObject, midObject, topObject]);
app.select(myGroup);
}
catch (myError) {
alert("could not group successfully");
}
}
catch (myError){
alert("Make sure you selected a graphic frame");
}
}
Masood Ahmad
ParticipantAfter a lot of hit and trials, I came up with this:
//Fake Duotone in InDesign
//Edited by: Masood Ahmad, 29th September 2017
//Original Script created by: Ari S. - designerjoe@outlook.comapp.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();
var midObject = bottomObject.duplicate();
topObject.transparencySettings.blendingSettings.blendMode = BlendMode.LUMINOSITY;
midObject.transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
bottomObject.transparencySettings.blendingSettings.blendMode = BlendMode.NORMAL;// Find Duotone swatch position
var myDoc = app.activeDocument;
var mySwatches = myDoc.swatches;
var swatchesLength = mySwatches.length;
for (i=0;i<swatchesLength;i++) {
if (mySwatches[i].name == "duotone" || mySwatches[i].name == "Duotone") {
var duotoneSwatch = mySwatches[i];
bottomObject.fillColor = duotoneSwatch;
}
}// Check if Duotone swatch is defined
if (duotoneSwatch == undefined) {
//alert("Please create a Duotone swatch");
var myColor = myDoc.colors.add();
myColor.colorValue = [75,5,100,0];
myColor.name = "Duotone";
bottomObject.fillColor = myColor;
}try {
var myGroup = bottomObject.parent.groups.add ([bottomObject, midObject, topObject]);
app.select(myGroup);
}
catch (myError) {
alert("could not group successfully");
}
}
catch (myError){
alert("Make sure you selected a graphic frame");
}
}
The scripts works well and duly checks, create and apply the Duotone swatch.
The only part remaining in the script is to:
1) Delete the image (content) from the bottomObject i.e. keep the bottom frame but delete its content image.Last but not the least, clean-up the script to avoid unnecessary codes.
Thanks in advance.
Masood Ahmad
ParticipantSorry, small correction in point # 6.
6) If “Duotone” colour already exists, then skip the creation of Duotone in point #5 and simply apply the Duotone color to the bottomObject.
-
AuthorPosts
