How to set the text frames loops through the active doc

Hi experts

I have this script:

myDoc var = app.activeDocument;

myTextFrame = myDoc.textFrames;

for (var F = myTextFrame.length;) F > 0; F --){

While (myTextFrame [F] .overflows)

myTextFrame [F].parentStory.pointSize-= 0.5;

}

but I still got the error after you run the script, can someone tell me what is the problem with set it?

respect of

John

not sure, but it works

myDoc = app.documents var [0];

myPages var = myDoc.pages;

for (var i = 0; i)< mypages.length;="" i++)="">

myPage var = myDoc.pages.item (i);

myFrame var = myPage.textFrames;

for (var m = 0; m< myframe.length;="" m++)="">

If (.overflows myFrame.item (m)) {}

myFrame.item (m).parentStory.pointSize-= 0.5;

}

};

};

Tags: InDesign

Similar Questions

  • WebCenter Sites REST API: How to set the active model?

    How can I set the model for the asset, I create.

    AssetBean sourceAsset = new AssetBean();

    sourceAsset.setName (value);

    sourceAsset.setName (prod_name);

    sourceAsset.setCreatedby (value);

    sourceAsset.setStatus (value);

    sourceAsset.setSubtype (value);

    ...

    but no set model?

    Hello

    The model on an asset is defined as an attribute:

    List attributes = sourceAsset.getAttributes()
    for(Attribute attribute: attributes) {
        if(attribute.getName().equals("template")) {
            attribute.getData().setStringValue("ArticleLayout2");
        }
    }
    

    or if you create a new item of assets:

    List attributes = sourceAsset.getAttributes()
    Attribute templateAttribute = new Attribute();
    templateAttribute.setName("template");
    templateAttribute.setData(new Data());
    templateAttribute.getData().setStringValue("ArticleLayout2");
    attributes.add(a);
    

    Kind regards

    Stephan.

  • C# / JavaScript how to set the primary text block?

    Hello

    I'm working with InDesign scripting API with c# for my work. I'm new to both the InDesign scripting API and using InDesign as well.

    I am building a gap of master, with blocks of text so that the text block on the left page of the cheese would pass in the block of text on the right page.


    I read there is the option block of primary text for the master spread, but I can't seem to understand how to use it.

    Is there someone who could show me an example of script code to define the framework of primary text for a master page/spread?


    Here is the code I have for now.

    The question I have is in line 53, where when I try to run it, it gives me a very generic error 'Invalid object for this request.', which leads me to believe I'm doing it wrong.

            public static byte[] CreatePageBasedOnCreatedMasterSpread(string savePath)
            {
                Application application = ActivateInDesign();
    
    
                // Create new document
                application.Documents.Add(true, application.DocumentPresets.FirstItem());
    
    
                // Get active document and change some settings
                Document document = application.ActiveDocument;
                document.DocumentPreferences.FacingPages = true;
                document.DocumentPreferences.PageWidth = 210;
                document.DocumentPreferences.PageHeight = 297;
    
    
                document.DocumentPreferences.CreatePrimaryTextFrame = true;
                document.TextPreferences.SmartTextReflow = true;
    
    
                MasterSpread masterSpread = document.MasterSpreads.Add();
                masterSpread.BaseName = "CustomMasterSpread";
                masterSpread.NamePrefix = "AC";
    
    
                //Set the document's ruler origin to page origin. This is very important
                //--if you don't do this, getting objects to the correct position on the
                //page is much more difficult.
                document.ViewPreferences.RulerOrigin = idRulerOrigin.idPageOrigin;
    
    
                Page leftPage = masterSpread.Pages.FirstItem();
                Page rightPage = masterSpread.Pages.LastItem();
    
    
                leftPage.MarginPreferences.Top = rightPage.MarginPreferences.Top = 10;
                leftPage.MarginPreferences.Bottom = rightPage.MarginPreferences.Bottom = 10;
                leftPage.MarginPreferences.Left = rightPage.MarginPreferences.Left = 30;
                leftPage.MarginPreferences.Right = rightPage.MarginPreferences.Right = 20;
    
    
                // Create a text frame. Do not add text to this, as this is a master spread text frame.
                // Link their flow together
                TextFrame primaryFirstPageTextFrame = leftPage.TextFrames.Add(document.Layers.FirstItem(), idLocationOptions.idUnknown, leftPage);
                TextFrame primarySecondPageTextFrame = rightPage.TextFrames.Add(document.Layers.FirstItem(), idLocationOptions.idUnknown, rightPage);
                primaryFirstPageTextFrame.NextTextFrame = primarySecondPageTextFrame;
                //Set primary text frame of master spread to be the two linked textframes
    
    
                primaryFirstPageTextFrame.GeometricBounds = GetPageBoundsWithMargin(leftPage, document);
                primarySecondPageTextFrame.GeometricBounds = GetPageBoundsWithMargin(rightPage, document);
             
                masterSpread.PrimaryTextFrame = primaryFirstPageTextFrame; //This causes the error
             
                return GetFileData(document, savePath);
            }
    
    

    I noticed the JavaScript API that is very similar to c#, so it would be useful if I get a response from JavaScript.

    Hi Michael,

    Basically, you can do something like this (in ExtendScript):

    //Store value:
    var storedPreset = app.documentPresets[0].createPrimaryTextFrame;
    
    //Let's set it to true:
    app.documentPresets[0].createPrimaryTextFrame = true;
    
    //Add the document, name the master as you wish etc.pp. :
    app.documents.add
    (
    
        {
            documentPrefreneces :
                {
                    facingPages : true
                    ,
                    pageWidth : "210 mm"
                    ,
                    pageHeight : "297 mm"
    
                }
        }
    
    );
    //Reset to stored value:
    app.documentPresets[0].createPrimaryTextFrame = storedPreset;
    

    Uwe

  • How to set the height of cfinput text

    How to set the height of a "text box" in ColdFusion? When I look at this in dreamweaver, the box is multiline, but when it appears in the browser, is only a single line.

    < cfinput type = "text" name = "Comments" size = "40" height = "500" width = "150" >

    Hmmm... just changed to

    and it works... didn't even worry Pass Through.

  • How to set the banner text in Vcenter?

    Hello

    I'm looking how to set the Banner text in Vcenter not in the ESX Server.

    The banner message should apper when connecting users on the VCenter server.

    Thanks in advance.

    See screenshot:

  • How to set a text index in the Data Modeler

    Hello

    How to set a text index (indextype is ctxsys.context) in data maker?

    The SQL command would be:

    create index P1_TEXT_BESCHR_SPRACHE on indextype P1_PDM_MODUL_SPRACHE (DESCRIPTION) is ctxsys.context
    parameters ("lexer global_lexer language format column FORMAT STORAGE PDMSTORE")
    Online
    /


    Thanks in advance for any help.

    Monika

    Hi Monika,

    After you create the relational model, you create a physical. In the physical model there is dialog box properties index, where you can set the properties of context index.

  • How to set the default duration through the effects of the dissolution?

    How to set the default duration through the effects of the dissolution? I use it on all the titles I would add, and I add a large number of titles on my clips and change the duration of each crossing simple dissolution effect is a little easy, but a lot of time.

    Or if there is simply a way to add titles giving cross them dissolve effect in case of default of a predefined, which would also be very useful. Enjoy all the tips

    Go to Preferences > general, then set it to "video Transition default Duration", but many executives you want it to be.

    Note that this applies to everything that you set your default transition, which is chained by default.

    Hope that helps!

  • How to set the ToolTip text programmatically?

    Anyone know how to set the ToolTip text programmatically? forms10g, db10g.

    Thank you
    m.

    Hello

    You can use the SET_ITEM_PROPERTY to define the criterion of an element tool tip.

    SET_ITEM_PROPERTY('.', TOOLTIP_TEXT, '');
    

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

  • How to set the focus

    Hai

    Say like page of connection in onload, the cursor should focus in the box, how to set the focus?

    Second, even connect click on the connection through properties of the keyboard button, if I click enter on the keyboard it should connect

    How to have the keyboard properties in flex?

    Can someone help me

    Thanks in advance :-)

    for logging by using the... button you can add eventlistenrer to the area of particular text... example...

    ti.addEventListener (KeyboardEvent.KEY_DOWN, EnterKeyEvent);

    private function EnterKeyEvent (event: KeyboardEvent): void
    {
    if(Event.keycode == 13)
    {
    do something
    }
    }

  • How to set the printer wireless ad Hoc mode to CP1025nw with automatic stop is off? IE never automatic.

    How to set the printer wireless ad Hoc mode to CP1025nw with automatic stop is off? IE never automatic.

    Thank you very much for your help, if necessary.

    Quite a few questions, send, but I will do what I can to answer them.

    I recommend first to buy a router, even if it's one you won't connect to internet and it network with others your PC and printer. This will give you the best features and the results of what you're trying to do.

    In addition, the automatic stop of the printer function can be disabled and is not affected by the type of connection. Usually, you can go through the configuration Menu and select tools to change the options there on the energy saving features.

    Finally, the auto off function on your computer is a Windows question, but one easy answer. If you're on a laptop, you can right click on the battery in the tray (lower right corner) and change the settings for energy conservation.

    You might be better off installing the printer via the USB cord and alternately inspiring when you use it, but which is not optimal if you are printing only a few documents on an irregular basis. A network connection is the easiest to manage across multiple computers, honesty, but you have certain requirements for this connection and limits as well.

    I hope this information is useful!

  • How to set the voltage on a 3.3 volt NI 9237 module?

    Hello

    How to set the voltage on a 3.3 volt NI 9237 module?

    The voltage is now at 2.5 volts.

    This is my first time with this camera.

    This set of MAX or are there jumpers?

    I want the value of the excitation voltage at 3.3 Volts and do not change.

    The NI 9237 is a NEITHER cDAQ-9172.

    Thank you

    Bill

    Hi POBA,.

    This can be set to your programming environment.  For example, LabVIEW Signal Express, a task of MAX, or a DLL call in a text-based environment.  You want to create a strain, tension Custom with excitement, or any bridge based task in any environment.

    "" "In MAX, right-click on your device and choose create a task" acquire signals "analog input"...

    "" "In LabVIEW, place a DAQ Assistant" acquire signals "analog input"...

    "" "In Signal Express, add a step for Acquire" DAQmx Acquire"analog input"...

    In any C language based, you will want to call a function such as: DAQmxCreateAIVoltageChanWithExcit, DAQmxCreateAIStrainGageChan, DAQmxCreateAIBridgeChan

    You can then specify the Source of Exictation to be internal to 3.3V.

    Best,

  • How to set the timeout of read when using channelReader.ReadWaveform?

    I'm using a USB-6210/a. data acquisition, and it works fine until I have to take a longer than 10 s waveform.

    When I take a longer than wave form, I get the error 200284, "some or all of the requested samples are not yet acquired.  To wait for the samples become available use longer read timeout... »

    No problem, I thought, I'll just put a longer period.  I searched through the documentation, and the timeout only I found was the watchdog timeout.  When I wanted a longer value, I get code 200452 State - specific property is not supported by the device or is not applicable to the task.

    I use the code in the example AcqVoltageSamples_IntClk.2008 .net with c# in Visual Studio 2008, .net 3.5 sp1.

    How to set the timeout so that ReadWaveform() is not the time?

    Here is the code:

    privateAnalogMultiChannelReaderchannelReader;

    privateAnalogWaveform awf;

    publicList GetWaveForm()

    {

    Try

    {

    Task getWaveform = newTask();

    getWaveform.AIChannels.CreateVoltageChannel (Channel,"", TerminalConfiguration, RangeMinimum,

    RangeMaximum, AIVoltageUnits.Volts);

    getWaveform.Timing.ConfigureSampleClock ("", SampleRate, SampleClockActiveEdge.Rising,)

    SampleQuantityMode.FiniteSamples, NumSamples);

    getWaveform.Control (TaskAction.Verify);

    channelReader = new AnalogMultiChannelReader (getWaveform.Stream);

    AnalogWaveformdata = channelReader.ReadWaveform (NumSamples);

    AWF = data [0];

    samples As new List();

    for (inti = 0; i)

    returnsamples;

    }

    catch (DaqExceptionexception)

    {

    MessageBox.Show (exception. (Message);

    }

    List of l = newList();

    return l;

    }

    Thank you

    Curt

    Hi Curt,.

    Here is a Knowledge Base that can help you to set the timeout setting in your code:

    The property using Timeout of DAQmx task in Visual Studio

  • How to set the SafeSearch settings in the Bing app?

    When you use Bing, how to set the SafeSearch settings?

    SafeSearch settings is accessible through settings App / in Bing SafeSearch.

    SafeSearch (and all the measures taken within SafeSearch) parameters are NOT shared with bing.com experience.   For example, you can have SafeSearch within the app set to OFF, but have the same function moderate to bing.com experience value.  In other words, these settings are not shared across app & bing.com experience.

    For more information on the experience of bing.com, see this article: http://onlinehelp.microsoft.com/en-us/bing/ff808441.aspx

  • How to set the height of row?

    How to set the height of row for my text in EA? I checked this article Edge animate help | Adding text to your project (tutorial) , but it refers to an old version of the environmental assessment.

    Hey Bruce,.

    You can set it in the user interface. Activate additional text settings in the property Panel by clicking on the arrow.

  • How to set the alignment of the field in a table in jdev 11.1.2.3?

    Hello
    How to set the alignment of the field in a table in jdev 11.1.2.3?
    for example: to display a body of numbers in a table as right aligned.
    I tried to put field (amount) VO UI Hint Format Type: Number; Format: 0000.00
    and jspx, flowing, but it doesnot work.
    Thank you.
    Bao

    < af:column sortProperty = "#{bindings." VO1.hints.amount.name}.
    sortable = "true".
    headerText = "#{bindings." VO1.hints.amount.label}.
    ID = "c44" width = "60".
    Align = "center" >
    < af:inputText value = "#{row.bindings.Amount.inputValue} '"
    label = "#{bindings." VO1.hints.amount.label}.
    required = "#{bindings." VO1.hints.amount.mandatory}.
    columns = "#{bindings." VO1.hints.amount.DisplayWidth}.
    maximumLength = "#{bindings." VO1.hints.amount.precision}.
    shortDesc = "#{bindings." VO1.hints.amount.ToolTip}.
    ID = "it58.
    secret = "false".
    inlineStyle = "" text-decoration: overline; ">"
    < f: validator binding="#{row.bindings.Amount.validator}"/ >
    < / af:inputText >
    < / af:column >

    Hello
    To set a field right alignment in a table:
    It doesnot work when InlineStyle-> text-align: right;
    It works when ContentStyle-> text-align: right;

Maybe you are looking for