Browse styles doesn't work does not go as planned.

I am trying to loop through all styles in a number of documents and locate all styles with the font "Times New Roman (OTF)." Unfortunately, no matter how I change the script, it triggers the alert when and where it should be. Any ideas? Thank you!

var myDocument = app.activeDocument;
for (a=1; a < myDocument.allParagraphStyles.length; a++) {
    if(myDocument.allParagraphStyles[a].appliedFont == "Times New Roman (OTF)") {alert()}
    };
for (b=1; b < myDocument.allCharacterStyles.length; b++) {
    if(myDocument.allCharacterStyles[b].appliedFont == "Times New Roman (OTF)") {alert()}
    };


Try this,

var myDocument = app.activeDocument;
for (a=1; a < myDocument.allParagraphStyles.length; a++) {
    if(myDocument.allParagraphStyles[a].appliedFont.fontFamily == "Times New Roman (OTF)") {alert()}
    };
for (b=1; b < myDocument.allCharacterStyles.length; b++) {
    if(myDocument.allCharacterStyles[b].appliedFont.fontFamily == "Times New Roman (OTF)") {alert()}
    };

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • with firefox 43 yahoo and yahoo mail doesn't work does not correctly

    With the help of win 7 and firefox 43.0.1, I have 4 computers and now all have problems with yahoo and yahoo mail doesn't work does not correctly. Loading sites, but most of the features are missing and clicking on what whether changes to the lists of text. I have disabled flash / anti-spam etc., cleared cookies and cache and even firefox loaded down once again and have upgraded, no help. I'm forced to use IE now.

    I tried Yahoo support, they said try Firefox... In any case, it's Firefox and I found a solution using the 'Refresh Firefox' button. Whatever the problem was fixed on two of my computers so far. Got to update my setting again but it's 10 m, compared to the 10 hours I spent trying all that is nothing.

    Thanks for the help!

  • WIFI doesn't work does not correctly after driver update

    I have a DESIRE 4 laptop 1023tu with operating system Windows 8 PRO. My WIFI works does not properly after the update drievr.

    Problems...

    1. When you try to connect to a wifi hotspot the quick adapter turns off and allows the card instantly

    2. after connected, sometimes no internet access and the problem turns off only after reconnecting to the netwrok after setting off.

    If the update doesn't work not for you then do as I explained in my previous post and roll back to the previous driver. This philosophy can be applied to all updates.

    If there is no pressure or emerging reason to update to your PC or laptop works just great... do not update. (this is especially true when it comes to an update of the BIOS)

    For your question #2, the problem could be your wireless (modem, router or access point) which causes the connection dropped.

    Best regards
    ERICO

  • AutoComplete doesn't work does not after installing IE *.

    AutoComplete URL function works does not after installing IE8.  Looking at the Advanced tab properties IE I see an option to use AutoComplete (which is
    ticked off) but it is said to "..". turn of Internet Explorer".  Whatever that means, and how I seized not semi-automatic work again under IE8?  I can go back
    for IE7, if it's the only way.   I tried to hit "reset" on the Advanced tab I saw a thread on try this - but no go...  Thank you

    sjakulski,
    Thank you for visiting the Microsoft Answers community forum.

    In Internet Explorer 8, the Auto complete option is in a new tab.  Go to tools, Internet Options and then click the content tab.  You will see a section that says "Auto-Complete".  Click on the 'Settings' button and it gives you several choices of auto complete options.

    This should solve your problem.  Let us know if you need more information.
    Thank you, Gloria
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Inherit CSS doesn't work does not (need help)

    Try as I might, I can't do the style of border to inherit. I found the code below in a published article and tried it. Unfortunately, it did not work as described or I would have predicted. Basically, I can't get border or any other default style not inherited to work. When I go below html 3rd paragraph beginning with the words "You Can... "do not have a border, or the fact the < a href >. According to the article and my understanding of inheritance as they should.

    Here is a link to the article. Original article

    Any help would be greatly appreciated.

    ----

    <! DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / BY" > ".
    < html >
    < head >
    < title > Structure CSS < /title >
    < style >
    div
    {
    do-family: Arial;
    color: Blue;
    font size: .9em;
    border: 1px solid black;
    }
    p
    {
    border: inherit;
    }
    one
    {
    border: inherit;
    }

    < / style >
    < / head >
    < body >
    < p > the Information technology (it) has been the domain of the most famous and more attractive during the 20 years and many students choose to study computer science and Information System who are eligible that they work as programmers, developers, database administrators and network engineers. < /p >
    "< Div > the < a href =" http://www.w3.org "> W3C site < /a >"
    contains the standard specifications of the web and it is very useful for Web designers, developers and software architectures to navigate this Web site. For example, you have CSS 2.1 specifications and XHTML 1.0 specifications discuss everything from A to Z on < br > technology
    < p > you can use CSS with the markup such as HTML, XHTML and XML languages. "All these languages for markup and CSS specifications a that the < a href =" http://www.w3.org "> W3C site < /a > < /p >"
    < / div >
    < / body >
    < / html >

    Based on your information and some additional research I discovered what is happening.

    IE6, IE7 and Opera does not support the value inherit. Firefox support. Design of DW window does not using any browser (they make their own thing), but also, incidentally, doesn't support (rendering) border: inherit.

    To help! important or no short form of border won't help.

    At least this is what explains what is happening.

    Thank you.

    Thank you

  • The home of the iphone 5 s screen button doesn't work does not correctly

    Home screen (middle button) does not work smoothly. Sometimes, it works very well and sometimes it doesn't. Someone might suggest it is a hardware or software problem that must do to solve this problem

    Hello

    Try a reboot press and hold the power button / stop and menu button hold both down until you see the apple logo.

    Also updated software iOS 10.1 over your WiFi

    See you soon

    Brian

  • Caps lock key doesn't work does not correctly. New computer.

    My shift key does not work correctly. Sometimes it works, sometimes it doesn't. I push on it is difficult to ensure that it works. But used in a standard keyboard, it is a problem because I don't bang the keys. I have to keep retype phrases due to errors that it creates.

    Its a shame because my computer is new. In fact, within a month, it is the second time I have to look at the service center. First time because the memory of my computer showed I consumed 40 GB without even having saved/downloaded a single file/document. The repair center did not have an answer and reformat the computer. This problem has been resolved.

    Was so much happier with my Dell computer. Nothing fancy, but no problem.

    I have the same problem. the button is enabled as soon as the second or even third. you don't want to, but you have to take it back in service. Maybe it's a factory default.

  • Facebook doesn't work does not correctly in 14.0.1

    Since the 14.0.1 update (maybe a 14 precedents), I could not post, or even ' like' items on Facebook. I can read pages fine, but am not able to grasp anything. I get a Facebook page that says, oops something does not etc.

    However, if I switch to IE, everything works fine. This happens on several computers. Two are running Win7, both XP, all NIS 2012 and all had no problem using FB with firefox in the past.

    The buttons next to the icon (friends, notifications) FB seem dead? Some users have reported that related to their cookie settings. Check out these threads to see if that might be the problem for you as well:

  • Ctrl key doesn't work does not correctly

    Hello

    I have a HP Pavilion 17-e031sa laptop bought only 2 weeks ago running Windows 8.  The CTRL key does not work as it should.  In general, I would like to use it with the left button of the mouse to select non-consecutive items for the copy, but this won't work for this function.  It doesn't seem to be the key itself, because it does not work in the combination of keys ctrl/alt/delete.  I tried to uninstall the keyboard driver and restart, but without success.  Any help would be appreciated.

    Hi riggy69,

    Sorry for the confusion, I knew that these keys would not do the function you're looking for. I wanted to know if these shortcuts worked using the CTRL key. So we can see if it works this particular function or all keys ctrl shortcuts work. Quick access keys did what they were supposed to do? For example, the Ctrl + X cut the selected text, or Ctrl-Esc opens the start menu?

    Trying to see if there something wrong with the key itself or is someone wrong with this particular feature you try.

    Thank you

  • Block of text requires the pixelation, hyperlink doesn't work does not, not installed fonts

    Hi, it's the first time I use Adobe Muse to design a Web site and I am trying to upload to the FTP host. Previously, I've always used Wordpress in my host.

    I finished my design and I followed the guide to download from FTP host, but at the end of it, I get 2 different warnings of Muse.

    They are thus:

    'Text-frame on the page "A-master" (with the text "Copyright 2014... ") requires the pixelation and contains a hyperlink. Hyperlink does not work in the browser. »

    «Text block on the page "Contact us" (with the text ' 332 Ang Mo Kio has...» ") uses a font named"Andalus", which is not installed. Another font. »

    How to solve these problems?

    Thank you.

    Hi Edwin,.

    The first error indicates that the text will be converted to image due to which the hyperlink does not work (this may be due to system fonts).

    Second mistake points again to the police Andalus is not installed on the computer, please confirm where you bought this policy of?

    Kind regards

    Akshay

  • \n doesn't work does not correctly

    Hello fellow Scripting Guys - it's probably something really basic, and it of really something minor but would be appreciated if someone could look in and explain why the \n does not work properly.

    I have a code;

    //created by Daryl Smith
    //puts artist name, filename, and date in the top left of the file.
    
      #target illustrator
    
    
      var thisDoc = app.activeDocument;
    
      var filename = app.activeDocument.name.replace(/\.[^\.]+$/, '');
      var createdate = app.activeDocument.modified;
    
      var  theDate = new Date();
            var day = theDate.getDate();
            var month = theDate.getMonth() + 1;
            var year = theDate.getFullYear();
            var hours = theDate.getHours();
            var min = theDate.getMinutes();
                if (min < 10)
                    min = ("0" + min);
            var morn;
                if (hours >= 12)
                    {
                        hours = hours-12;
                        morn = " PM";
                    }
                else
                    morn = " AM"
    
    var saveDate = (month + "-" + day + "-" + year + "    " + hours + ":" + min + morn );
    
    
      var nameTextFrame = thisDoc.textFrames.add();
        nameTextFrame.contents = globalartistname + "\n" + filename + "\n" + saveDate; 
        nameTextFrame.filled = true;
        nameTextFrame.alignment = "center";
       
       
       var thisdoc = app.activeDocument; 
       var hasDocCoords = app.coordinateSystem == CoordinateSystem.ARTBOARDCOORDINATESYSTEM;
           
           
            var p = thisdoc.pageItems; 
            for (var i = 0, l = p.length; i < l; i++) { 
                var pID = p[i]; 
                if (pID.guides == true) { 
                    var guideBox = pID 
                } 
            }  
            var wNum = guideBox.width; 
            var hNum = guideBox.height;
           
            var tboxw = nameTextFrame.width;
            var tboxh = nameTextFrame.height;
           
            var xOffset = (wNum/2);
            var yOffset = (hNum/2);
           
           
            var xNum = guideBox.position[0]+xOffset-tboxw-50; 
            var yNum = guideBox.position[1] + tboxh + 80 ;
           
    
       
        nameTextFrame.position = [xNum,yNum]
      
    
    

    I run my use of pallets;

    var putname = new File("S:/Art/ArtDept/Illustrator JS Palette/Scripts/Art Share Server/Construct/filenameonart.jsx");
    miscgroup.add ("iconbutton", undefined, ScriptUI.newImage (miscputnameIcon.a, miscputnameIcon.b, miscputnameIcon.c, miscputnameIcon.d),{style:"toolbutton"});
    
    

    Zantcor wrote:

    The script works correctly when I run the script directly but does not work when I run it from the pallet.

    Simply by using the following, given your case to have only one line seems to work very well. Directly and when loaded via BT, it seems to work fine as long as you have planned in my simplified test configuration.

    nameTextFrame.contents = decodeURI(globalartistname + "%0d" + filename + "%0d" + saveDate);
    
  • Address bar doesn't work does not and is not AutoComplete. Places.SQLite file is not damaged.

    Since the last update, Firefox 49 and 50, the address bar has stopped working. First of all, it would not be before semi-automatic with my browsing history, and now he's not let me even in Web sites. I checked the places.sqlite file and it is not corrupt. I also tried to disable hardware acceleration, but it does nothing more. However, I started Firefox in safe mode and it works very well. What should be the problem here?

    Hi, because it works in Mode safe, pointing to an add-on or theme that is not compatible.

    Start Firefox normally, and then disable any topic and the modules one by one until you find the culprit - Manager of modules additional (Ctrl + Shift + A) > appearance/Extensions. You may need to restart Firefox after you disable some of them.

    More: Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems.

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you!

  • DB between 11.2.0.2 and 11.2.0.3 DBs version link doesn't work does not correctly

    Remote schema in 11.2.0.3 DB


    In 11.2.0.2 DB, I created a link pointing to a diagram in a DB 11.2.0.3 DB
    -- Used the new 11.2 syntax (similar to easy connect )
    
    SQL > CREATE DATABASE LINK dropLater CONNECT TO SCOTT IDENTIFIED BY SCOTT_123 USING 'blpclst-scan.ap.haster.com:3587/SNPG_AP.ap.haster.com';
    
    Database link created.
    
    SQL > select count(*) from ind_names@dropLater;
    select count(*) from ind_names@dropLater
                         *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-02063: preceding line from DROPLATER
    
    
    
    -- But the Sysdate from dual test is working fine
    
    SQL > select sysdate from dual@DROPLATER;
    
    SYSDATE
    --------------------
    21 Nov 2012 13:24:29
    IND_NAMES Table exists in the remote schema SCOTT. Anyone faced a similair with DB links problem?

    I think that this problem is due to the difference in version (11.2.0.2 to 11.2.0.3)

    Hello

    I don't think that the other version is giving the problem.

    It seems that the SCOTT user doesn't have access to this table in the remote database.
    It seems odd if you say that the IND_NAMES table doesn't exist in the remote schema SCOTT.

    Could you run the following statements and see the objects owned by the user SCOTT in remote db?

    SELECT * FROM user_objects@droplater;
    

    If the table exists in the remote schema SCOTT should appear in the output among other objects belonged schema SCOTT.

    Kind regards.
    Al

    Published by: Alberto Faenza on 21 November 2012 14:55

  • Apply the following Style doesn't work is not for me. apply the bad style

    I have two set up paragraph styles: 'Head 1 with the rule' and "head 3". Both work very well on their own. I want to use the following Style to apply "Head 3" automatically after that I use 'Head 1 with the rule' and press return. That's a title and subtitle in a society newsletter. The Setup looks right to me.

    Capture2.JPG

    Capture3.JPG

    Yet when I try, "Head 3" does not follow after "Head 1 with the rule. Instead, I get my paragraph style "body text".

    Capture.JPG

    Help appreciated. Thank you.

    You have an empty return once the head 1, if you select the return that he decorated with Head3?

  • Firefox doesn't work does not correctly on Windows 10

    Well, I've upgraded to Windows 10 and since then, Firefox is not working properly (not not display graphics, google sites won't load do not, etc.), I tried uninstalling and reinstalling several times, I even waited for the new update... None of them worked. I read something about security certificates, saying I had to import them to Firefox, but the certificate that he mentioned did not exist in my computer. I have also disabled hardware acceleration, cleared my cache, even deleted my profile from my computer, all to nothing does not. It is sad to see the attached screen. (A text-only screen saying: "Firefox + Windows 10.) Perfect set")

    I hope you guys can resolve this problem as soon as possible. If this is happening to me, it happens to a lot of people.

    Did you secure yourself certificate errors? If Yes, do you use Avast, BitDefender, ESET or Kaspersky?

    If you do, we can give specific suggestions.*

    If this is not the case, a further 10 Windows users questions are report is that they were added to a family and their Firefox has been the subject of parental controls that causes seemingly random crashes. Try to turn off the parental control of Microsoft (or are not part of a family): http://windows.microsoft.com/en-us/windows-10/turn-off-microsoft-family-settings

    * For Avast, you can disable the part numerical analysis of Web Shield. I saw these steps in another post:

    1. Open the Avast dashboard on an affected system.
    2. Select settings in the left side menu.
    3. Adopt a Protection Active.
    4. Click on customize next to the Web Shield.
    5. Uncheck the option "Enable HTTPS analysis", and then click ok.

Maybe you are looking for

  • You cannot change the length of the transition from photo album

    Does anyone know why I can't change the length of one of the album transitions four other than 16 frames photo?  The transition moves way to fast to a half second really give me the effect I was hoping.  Working with fcpx 10.2.3.  Running on an iMac,

  • Satellite L655 - 130G: what is the 130 GB partition for?

    You are not sure if it's ok to ask here?There are a score of 130 GB not used not drank the system? and I think that it is not for the recovery software,What it is? Can I use it?

  • Lets get sorted HttpConnection, shall we.

    This is my code URLEncodedPostData f = new URLEncodedPostData("", false); f.append("here", "there"); f.append("weebl", "bob"); HttpConnection c = (HttpConnection) Connector.open("http://localhost:50884/WebService/Default.aspx"); c.setRequestMethod(Ht

  • What graphics card to Optiplex 755?

    I read some interesting things lately, like ' players not to buy jobs ', and there is really not much difference between a high-end workstation graphics card and a high-end card gamer, except the stabile, the ability to render OpenGL drivers and the

  • App icons when alt - tab

    I alt - tab between the applications of hundreds of times every day.  The thin frame around the selected application is a little too thin, too transparent.  Y at - it a setting that I can do to make the selected app outline when alt-tabbing in a dark