Forum Replies Created
-
AuthorPosts
-
Masood Ahmad
ParticipantAny clues…
Masood Ahmad
ParticipantHi Qing and Robert,
I’m facing an issue while running the script. The text frame containing the text and inline images runs on multiple pages. Every column is a separate text frame, for example, there are 6 text frames for a 6 column layout on every page. So I realized that while selecting only one text frame on the first page, the script make changes only to that particular text frame, whereas the other content remains unchanged. If I select multiple text frame, then it make changes to the contents of all the selected text-frames. As you know we can’t select frames on multiple pages, I’m facing issues. So is there a way, that the script can make changes to the entire story. Or a better way is to select the text using text tool and then run the script.
//DESCRIPTION: Fit Image to Frame for Inline graphics//https://indesignsecrets.com/topic/image-fitting-options-on-anchored-graphic-frames
//Version: 1.0, dated: 2nd October 2019.app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Image Fitting Script");
function main() {
// Capture the current selections in array
var mySelections = app.selection;
for (var i = 0; i < mySelections.length; i++) {
var myObject = mySelections[i];
if (myObject instanceof TextFrame) {
var allRtg = myObject.rectangles.everyItem().getElements();
for (var j = 0; j < allRtg.length; j++) {
var theRtg = allRtg[j];
try {
theRtg.fit(FitOptions.contentToFrame);
theRtg.fit(FitOptions.proportionally);
theRtg.fit(FitOptions.frameToContent);
theRtg.fit(FitOptions.centerContent);
} catch (e) { }
}
}
}
}
Please look into this and help me out. Thanks in advance.
Masood
Masood Ahmad
ParticipantThanks Qing and Robert, both the scripts worked well.
I just noticed that some inline graphic frames got reduced in size and they are now left align as per the Paragraph style. I was thinking of a way to center align all the inline objects.
I tried this:
myObject.Justification.CENTER_ALIGN;
and this:
theRtg.fit(Justification.CENTER_ALIGN);Can you help me out on this as well.
In addition, is it doable with little extra code to assign a para style, let’s say “Inline_Images” to all those inline graphic frames.
September 30, 2019 at 10:21 am in reply to: Apply [Unconditional] condition to Conditional Text #14324012Masood Ahmad
ParticipantThanks Robert, for your quick code. It works like a charm.
Just checking if all the Unused Conditions can be removed by adding some extra code to it.
Masood Ahmad
ParticipantHi Matthew,
Are you looking for this, I just realised that I have a copy of the script is in my discs.
https://www.dropbox.com/s/2u68zmibotqi3k8/GREP_Toggler_EnableOrDisable%20%5B1.4a%5D.jsx?dl=0
Masood Ahmad
ParticipantAway from computer
Try this:Grep Find:
([\u])(o)
Change to:X$1Masood Ahmad
ParticipantTry this…
GREP Find/Change:
Find What:^(Name1:.+\r)(Name1:.+\r)+
Change to:$0\rMasood Ahmad
ParticipantI don’t think this is achievable with GREP, may be some script can do the magic.
Masood Ahmad
ParticipantTry exporting the file as IDML, then open the IDML file and work on that. In case the issue persists, please send a copy of the InDesign file to me to analyze.
masood.designs@gmail.comMasood Ahmad
ParticipantWell there’s a trick to avoid relinking the images to the desktop folder. Just close the InDesign file without saving.
Try it and let me know of other issues you may encounter.
Masood Ahmad
ParticipantYou’re welcome Peter.
January 31, 2019 at 10:01 am in reply to: InDesign 5.5 for Windows and Excel: find a code/price in .xls, replace into Indd #114061Masood Ahmad
ParticipantYes, I should have counted that as well :)
Masood Ahmad
ParticipantSelect all the images in the Links Panel and right click on the selection, click the
Relink…option from the list.A window will pop-up asking you to select the folder containing your images.
You’re done!
Masood Ahmad
ParticipantJanuary 31, 2019 at 9:16 am in reply to: InDesign 5.5 for Windows and Excel: find a code/price in .xls, replace into Indd #114056Masood Ahmad
ParticipantHa ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha :)
Welcome to the Forum.
I was expecting this from you. Only a handful people knows that Michel do not work for free until it is a one liner script.
You can contact Michel on the email ID given by him and send your requirements in detail.
Happy Scripting… :)
-
AuthorPosts
