Re: Get name of the folder after parent.
If you follow the parental trail up from any folder, you'll eventually reach the top. The top is null. So, your statement is failing because you are assuming that that your file is sufficiently deep...
View ArticleChanging tabs value in paragraph style based on longest word
Hi,I am writing a javascript that wil find all dialogue in a text frame, indent it and bold it. I have managed to figure out with GREP how to find and bold the dialogue, but i can't figure out a way to...
View ArticleRe: Changing tabs value in paragraph style based on longest word
It's not clear what's causing you dificulty. Are you aware of the horizontalOffset property of text? With that, you can measure the length of the dialog prefixes in the paragraphs of interest and then...
View Articlecharacter + appliedFont
Hi Forum, I tried with the below script to find a character "•" and its font name... but result, is "Undefined". Tf = app.activeDocument.pages.everyItem().textFrames.everyItem().getElemen ts();for(i=0;...
View ArticleRe: character + appliedFont
Hi artCraf2, Please try the below JS code. This is simple way to find the specific character with respective font name not font style (bold, italic), If you want just add the font style....
View ArticleRe: Scripts for Vertical Justfication TextFrame
Think I've answered my own question... paragraph styles have an option to 'align away from spine' rather than say range left or right. This works perfectly when using facing pages.Over and out.
View ArticleRe: character + appliedFont
Hi csm_phil, How Can i get alert, if my findWhat.appliedFont not equal to Courier New font. I have just tried like this... app.findTextPreferences = app.changeTextPreferences =...
View ArticleRe: Changing tabs value in paragraph style based on longest word
Here's a more detailed flow of Dave's method (I think): If you have indent to here tabs get rid of them using textFind .. findWhat = "^i"; changeTo = ""; myDoc.changeText(); Now ONE PAGE AT A TIME AND...
View ArticleIt is possible to script a decimal approximation in Indesign?
In a file many decimal numbers should be approximate.It is possible to script it? Real Required22,90 2321,87 2226,47 2611,93 1229,16 29
View ArticleRe: It is possible to script a decimal approximation in Indesign?
Can use Where myNumber is the number you need to checkMath.round(myNumber); There is a little problem of how .5 is handeled sometimes It will be rounded down and sometime upIf this is important you can...
View ArticleRe: It is possible to script a decimal approximation in Indesign?
Use findGrep to get the aray of numbers in the fileProcess them as above and use changeGrep to change them
View ArticleRe: Replace fonts in InDesign CS6, js
Yuliart please mark as correct Virender, I didn't put in the font style because it wasn't asked for but if you are finding both the font and the style as in your example then you don't need to do a...
View ArticleRe: character + appliedFont
app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing; app.findTextPreferences.findWhat = "•"; var myFindFont = app.activeDocument.findText();for(var i=0; i<myFindFont.length;...
View ArticleRe: Replace fonts in InDesign CS6, js
I need one more thing: how to make sure that the font used is OTF. Thank you.Yulia
View ArticleRe: Replace fonts in InDesign CS6, js
Which font?The one you want to find or the one you want to change to?
View ArticleRe: Replace fonts in InDesign CS6, js
But .. you KNOW with what font you are going to replace. You have to type in the name in the script! Why would you do that with a "wrong" font?
View ArticleRe: Replace fonts in InDesign CS6, js
I'm a bit confused If you are selecting a given font in advanced to be changed to you can just look in indesigns font menu and see if there's an O next to itIf you to see the type of a particluar font...
View ArticleRe: It is possible to script a decimal approximation in Indesign?
Trevor, rounding issues on "0.5" would only be a problem inside a Javascript. What you describe is what happens when a value seems to be reported as "0.5" but is actually "0.49" (for any number of...
View Article