Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: character + appliedFont

$
0
0

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 = NothingEnum.nothing;

app.findTextPreferences.findWhat = "•";

app.findTextPreferences.appliedFont = "Minion Pro"; //if not in Minion pro font.....

//If you want find a bullet character along with bold format use the below line. above line is only for font name.

//app.findTextPreferences.appliedFont = "Courier New\tBold";

var myFindFont = app.activeDocument.findText();

for(var i=0; i<myFindFont.length; i++){

    if(myFindFont!== true)

    alert ("• is not in Courier Font, convert to app. font")

    }


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>