Place a marginal elements using the object styles

Hello

When I use this script I found this error.

1 paragraph style = TA

2 style of the object = TA

3 library name = ANNO

Script from here

main();

main() {} function

If {(app.documents.length!=0)}

{if(App.Libraries.Length!=0)}

myStyleDialog();

}

else {}

Alert ("Please open library.");

}

}

else {}

Alert ("Please open a document and try again.');

Exit (0);

}

}

function myStyleDialog() {}

var myLabelWidth = 120;

var myParaStyleNames = myGetParagraphStyleNames();

var myObjStyleNames = myGetObjectStyleNames();

myDialog = app.dialogs.add var ({name: "Choose the Styles instead of anchoring"});

{with (MyDialog.dialogColumns.Add ())}

{with (borderPanels.Add ())}

{with (dialogColumns.Add ())}

{with (dialogRows.Add ())}

{with (dialogColumns.Add ())}

staticTexts.add ({staticLabel: "paragraph Styles:", minWidth:myLabelWidth});})

}

{with (dialogColumns.Add ())}

myParaStyleDropdown = dropdowns.add ({stringList:myParaStyleNames, selectedIndex:0});})

}

}

{with (dialogRows.Add ())}

{with (dialogColumns.Add ())}

staticTexts.add ({staticLabel: "Object Styles:", minWidth:myLabelWidth});})

}

{with (dialogColumns.Add ())}

myObjectStyleDropdown = dropdowns.add ({stringList:myObjStyleNames, selectedIndex:0});})

}

}

}

}

myReturn = myDialog.show ();

if(myReturn == true) {}

myParagraphStyle = myParaStyleNames [myParaStyleDropdown.selectedIndex];

myObjectStyle = myObjStyleNames [myObjectStyleDropdown.selectedIndex];

myDialog.destroy ();

}

else {}

myDialog.destroy ();

}

}

}

function myGetParagraphStyleNames() {}

var myStyleNames = app.documents.item (0).paragraphStyles.everyItem () .name;

Return myStyleNames;

}

function myGetObjectStyleNames() {}

var myObjStyleNames = app.documents.item (0).objectStyles.everyItem () .name;

Return myObjStyleNames;

}

myDoc = app.documents var [0];

myLib var = app.libraries [0];

app.findTextPreferences = NothingEnum.nothing;

app.changeTextPreferences = NothingEnum.nothing;

app.findTextPreferences = null;

app.findTextPreferences.appliedParagraphStyle = myParagraphStyle;

myFind = myDoc.findText (true);

var myCount = 0;

for (i = 0; i < myFind.length; i ++)

{

myText = myLib.assets.item ("ANNO") .placeAsset (myFind [i] .insertionPoints [-1]) [0];

< < replace > > myText.insertionPoints [0] = [i] myFind .silence;

<> <> myText.appliedObjectStyle = myObjectStyle;

<> <> myText.contents = [i] myFind .silence;

myFind [i] .move (LocationOptions.after, myText.insertionPoints [0]);

myText.appliedObjectStyle = myDoc.objectStyles.item (myObjectStyle);

myText.fit (FitOptions.frameToContent);

myCount ++;

}

alert (myCount + "ANNOs are placed successfully...");

For more information, I am attaching the file.

Screen Shot 2012-03-20 at 10.51.16 AM.png

Please give any solution for the issues mentioned above. When I want to change in this script?

Thanks in advance...

Just replace the loop in your script,

for (var i=0; i

I tested the script with CS5 windows. I found that the myFind [i] does not work. I think it may be because of its index changes after inserting library item after this paragraph. IE: myFind [i] includes the item inserted as well.

Green4ever

Tags: InDesign

Similar Questions

  • Can I create a form using the object styles in InDesign

    Hello

    Is it possible to create a form in the object Styles I can create in InDesign? I know that I can attribute some qualities, but I would like to create a capsule form that will be repeated throughout a page of lists in our sites.

    So far, I have to copy, paste, and anchor the object in the text which is quite time that we have thousands of ads, and life is too short for mundane tasks.

    If I can create a form of object Styles, by entering its dimensions, it will allow me to create the style for import into InDesign, 4 d, our CMS.

    If not, can we have it in a new construction, please Adobe?

    I look forward to your reply.

    Thank you

    Roy

    That can be done with tabs and styles nested using underscore with a custom stroke style. I hope that these screenshots should explain it...

  • using an object style before the placement of the image

    I want to place 20 images using an object style in which I have a black 3point outline for all images. How can I do? I have to manually apply an object style to the images after that that they have been placed.

    As far as I know, it always works to place WITHOUT pre-existing framework: http://indesignsecrets.com/applying-an-object-style-when-placing-an-image.php

    If you want to do some sort of pre-existing images, you use the rectangle tool instead of the frame tool.

  • Why can I not use the "display style settings?

    I bought and downloaded 12 elements. But I can't do many things. I can't use the 'display style settings"I can't download new effects. I'm not impressed. What should I do?

    Find the forum for any program elements it is and ask questions on how to use it.

    Photoshop Elements

    First Elements

  • I use the older style firefox and can not get the password manager to remember one of my passwords, how can I do this

    I use the old style Firefox browser and can not get the password manager to remember a password of my main site. How can I do this?

    Thanks for the advice, I went to another program... Last time... and saved my passwords with it. I find it easy to use and non-intrusive, and it has several features that are very convenient for me.

  • Using the layer style, mix if it doesn't work

    I use the layer style, if mix GREEN mode and he abandoned all colors.  Why is this happening?  The photo is a RGB 8 bit jpg.  When I select any color or grayscale it takes all colors.  I'm doing something wrong?

    I followed the instructions by training from Lynda.com on Photoshop CS4.  The instructor took a sky background.  The only difference is that I am trying to remove the green of the trees in the background so that I can bring other photos to the background image.

    Thanks in advance.

    Oops

    Not a bug. The color range tool, remembers the last setting even after outgoing PS and he raises. Because this setting can be from a completely different image, unconnected with, the memory can be disconcerting to a user unfamiliar with this tool.

    Just ignore the displayed initial selection and start highlighting the left of the three eyedroppers and click in the image on a color you want to select. Twist the blur to expand or reduce the range of color affected. Switch to pipettes middle or right and click a different tone of color linked to add or subtract from the original selection.

    Optionally, you can choose to stay with the eyedropper on the left and press SHIFT or Alt keys while clicking on the image to add or subtract.

    For what you are trying to do it on the specific image you presented, you won't find the satisfactory color range tool.

  • Apply an object style to the group without changing the object style of page within the group elements?

    Does anyone know a way to apply an object style to a group without changing the style of the subject of the articles within the Group?

    Well, as far as I know, there no way to do it. Apply an object style to a group applies this style to all elements within the group as well. So, I resorted to writing a script for this.

  • Is it possible to access AMX element using the AMS item ID and then update the value of the AMX?

    I created a prototype - where I need to create a static Page AMX element. I have a bean that will have a method of UPDATING: the user interaction with the element AMX fires this UPDATE method, and the method will determine the value of another node AMX. The example is as follows

    <? XML version = "1.0" encoding = "UTF-8"? >

    "< amx:view xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xmlns:amx ="http://xmlns.oracle.com/adf/mf/amx"

    xmlns:dvtm ="http://xmlns.oracle.com/adf/mf/amx/dvt" >. "

    < amx:panelPage id = "pp1" >

    < amx:facet name = "header" >

    < amx:outputText value = "Header-XXX" id = "ot1" / >

    < / amx:facet >

    "< amx:selectOneChoice label = '1' id = 'soc1" value = ""valueChangeListener ="#{SolverLogic.Update1}" > "

    "< amx:selectItem label =" "id ="si667803"value ="-1"/ >"

    < amx:selectItem label = 'O1' id = 'si667804' value="667800.667803.667804"/ >

    < amx:selectItem label = "O2" id = "si667805" value="667800.667803.667805"/ >

    < amx:selectItem label = "O3" id = "si667806" value="667800.667803.667806"/ >

    < / amx:selectOneChoice >

    "< amx:selectOneChoice label ="2"id ="soc753865"value =" ">."

    "< amx:selectItem label =" "id ="si2"value ="-1"/ >"

    < amx:selectItem label = "Ø21" id = "si753866" value="667800.753865.753866"/ >

    < amx:selectItem label = "Ø22" id = "si753867" value="667800.753865.753867"/ >

    < amx:selectItem label = "O23" id = "si753868" value="667800.753865.753868"/ >

    < / amx:selectOneChoice >

    < / amx:panelPage >

    < / amx:view >

    When the user selects 'O1' - 'SolverLogic.Update1' bean - will calculate 'Ø21' must be selected. Is there a way to access the node AMX 'amx:selectOneChoice label is '2' ' - using the ID - id = "soc753865" sound, and then set the value as "value = 'Ø21' '"

    My requirement is that I don't need a DataController object, I have a binary file that contains the business logic, what I need is to create a static page and then use business logic to determine the result of user interaction and then update the user interface accordingly.

    Thank you

    Shailendra

    There is no label but value.

    You must have the below for the value of selectonechoice:

  • Confused about replacement of the object style that I can't understand

    Hello

    So I'll try to understand and to clean up a book a bit messy, I inherited (lots of inconsistent style and replacements). There are a bunch of boxes that have a style of object applied to them, but seem to have odd substitutions, which I can't understand how even got implemented Medallion.

    In particular, they have a substitution of "text frame General Options (spacing inset at left; Inset spacing on the right. I can't understand how you can even replace the object for this style.

    Even more strange, the paragraph style has a right of withdrawal. 0625 "and the withdrawal to the left of 0, but on the screen, I see the left indent is also. 0625 ". Even if it is not specified anywhere.

    Inside the style, is the inset spacing. 0.25 "right and left 25" and it's actually how the text is aligned. But it is clear lines on screens as if there is a left and right inset of 0,1875 "and a withdrawal of paragraph 0,0625 on both sides, when styles don't say this.

    Why do I care about all this? Well, I need to convert this CS6, and when I did, I found an extra. 0625 "Indent on the right side causing overset text. This led me down this rabbit hole.

    I know I have to get rid of all completely replacements and I intend to do at some point, but I can't do it right now for reasons of time, and I'm also actually really curious what is happening here. Anyone have any ideas? Thank you.

    You have shown a paragraph style, but not necessarily one that is actually used. I have no way of knowing what calls for the definition of object style (but I see a substitution for the paragraph style), or what style is assigned to the text in this framework.

    Messed up, it is probably a good description of the current state, but to understand what is wrong, you will have to dig into what is really defined as opposed to what the appeal of styles to, then delete the replacements or redefine styles to give you what you want and probably some of both.

    You can use find/replace to find a style and replace it with itself to remove the replacements, I recall.

  • How to fill the value in the nested table by using the object type


    Hi gurus

    I created an object type and able to fill the values in it, now I want to create a nested table type of this object and fill it but looks like I'm doing something wrong, see my code below.

    Code example

    CREATE or REPLACE TYPE countries_o
    AS
    OBJECT
    (
    COUNTRY_ID TANK (2 BYTES),
    COUNTRY_NAME VARCHAR2 (40 BYTE),
    REGION_ID NUMBER);
    /

    create or replace type countries_t is table of the countries_o;

    /

    CREATE OR REPLACE

    ABC of the PROCEDURE

    IS

    v_print countries_t; -: = arr_countries_t('01','Aus',1);

    BEGIN

    v_print: = countries_t('01','A',11);

    DBMS_OUTPUT. Put_line (v_print. COUNTRY_ID | v_print. COUNTRY_NAME | v_print. REGION_ID);

    END;

    /

    Error

    • Error (6.3): PL/SQL: statement ignored
    • Error (6,12): PLS-00306: wrong number or types of arguments in the call to 'COUNTRIES_T '.
    • Error (7.3): PL/SQL: statement ignored
    • Error (7.32): PLS-00302: component 'COUNTRY_ID' must be declared

    Thanks in advance

    Concerning

    Muzz

    Hi user,

    Here is another method that you can try-

    CREATE OR REPLACE

    ABC of the PROCEDURE

    IS

    v_print countries_t: = countries_t (countries_o('01','A',11));

    BEGIN

    DBMS_OUTPUT. Put_line (v_print (1).) COUNTRY_ID | v_print (1). COUNTRY_NAME | v_print (1). REGION_ID); -you're accessinf the first element of the nested table, which in turn points to the object.

    END;

    In the sections of the declaration you have assigned values to the nested table.

    Kind regards
    Maxou

  • I AM trying to DOWNLOAD ADOBE PHOTOSHOP ELEMENTS using the redemption code, but it won't let me?

    I bought Photoshop Elements and followed all the instructions for download through the www.adobe.com/go/getserial because I don't have a CD player. I got the serial number, but it still won't let me download the software?

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • use the same style of type in different documents

    Hello

    I was exploring the character styles, and I feel that if you save a style to a particular file, you can use that style stored in another file, I am correct?

    I have many files and I want to use the same consistent style in each of them, that the best way to do it?

    Thank you!

    You can use load paragraph Styles (or Load all Styles) to copy your original document for new styles.

    You can also copy the style of text and paste it into the new document. If style names are not already named in the new document, the styles will come with the text. Be careful with this, however. If your new document includes the names of styles that match those that you paste in, the pasted text reformats the attributes defined in the new document.

  • Decimal places missing in Pivot using the rule of aggregation 'average '.

    Hi, I have a PivotTable that has three layers. The first two are made and displayed in the form of values, and the last of them uses the average of the aggregation rule to create an average of the first two. Thus, for example, I have a month a closed case counts, then a count of the number of days to close the cases, and then I want the average number of days to end. The problem is that days on average close appears always to round down - even if I'm showing two decimal places.

    Closed the case = 103
    Closing days = 1599
    Closing days on average = 15.52 (calculated) but the poster 15.0 pivot

    Any ideas on how to solve this problem would be appreciated.

    Thank you
    Larry

    OBIEE is actuelly the correct calculation of handling. If you divede two whole mathematical standards you can not get a fraction. To work around this, you must first convert duplicate ==> CAST ("days to close" DOUBLE) / CAST ("closed cases" as DOUBLE)

    Concerning

    John
    http://www.obiee101.blogspot.com/

  • assign a value to a text element using the PL/SQL function body

    Hello

    I want to assign a value to a text element using PL/SQL function body option in the Source elements. But the below error when I try to apply it.

    Source code:

    declare
    name varchar2 (100);
    Start
    If v ("P3_CREHIDD") = 'Edit' then
    Select ename in the name of cpy_emp where empno = v('P3_EMPNO2');

    end if;
    end;


    ERR-1904 unable to calculate the default item: type = computation_type = function body declare name varchar2 (100); so start v ('P3_CREHIDD') = 'Edit' and then select ename in the name of cpy_emp where empno = v('P3_EMPNO2'); end if; end;.

    Thank you
    David.

    Hello

    Your body of the function doesn't return anything.
    Maybe it works

    declare
      l_name varchar2(100);
    begin
      if v('P3_CREHIDD') = 'Edit' then
        select ename
        into l_name
        from cpy_emp
        where empno = v('P3_EMPNO2');
      end if;
      RETURN l_name;
    end;
    

    BR, Jari

  • How to use the different style sheets for ChangeAttributeRequest workflow in OAM

    Hello

    We have a requirement to invoke different change attribute request workflows (change password, change email etc.) of external JSPs.
    I want to apply different style sheets for each workflow. In the URL of the workflow if I get style = the style sheet name its not not using this stylesheet. Its still using the same basic (wf_changeattr.xsl) stylesheet. How can I use different style sheets? Pointers on this is appreciated.

    Thank you inadvance.

    Kind regards
    Srikanth

    Hi Srikanth,

    Are you using & xsl = stylesheetname or & style = parameter? XSL = must specify a specific xsl file, while & style specifies a complete style (for example & style = style0 for the default style).

    Kind regards
    Colin

Maybe you are looking for