rather than anchor image by finding the text...

Hi scripting gurus & everyone,

We work with InDesign CS3 files. And we need to put two different icons as objects of anchoring in the margins by finding respective legends. If the legend is "[pair-icon]" means the icon P (i.e. the image), which should be placed as anchored object. If the legend is "[group-icon]" means the icon-G (i.e. the image) which must be placed as anchored object. The icons have about 3 pica height and width. He will always be just to the left of the margin in front and back pages. Of automation for investments of object anchor is new for us.

Can someone help me with this.

Thanks in advance.

Indana

Here's the complete script. Based on the fact that your library is open, that it contains two assets that have been appointed, and that you have an object named "icon" style You can also set the search options (include notes, stories, locked, etc..)

The script for this: find all instances of [P-ICON] and [G-ICON] (which is [[PG] - ICON] in GREP). Browse the table of found items (findGrep (true) returns the items in reverse order), inserting an asset to the last point of insertion of each instance found. Each instance concluded (i.e. each myFound [i] .silence) is the name of an asset.

This marginal stuff is good fun. I just put to evil together a system of information on the dynamic margin (http://www.kahrel.plus.com/indesign/sidenotes.html).

Peter

#target indesign

myDoc = app.documents[0];
myObjectStyle = myDoc.objectStyles.item ("icon");
myLib = app.libraries[0];

app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\[[PG]-ICON\\]";
var myFound = myDoc.findGrep (true);
try
   {
   for (i = 0; i < myFound.length; i++)
      {
      myIcon = myLib.assets.item (myFound[i].contents).placeAsset (myFound[i].insertionPoints[-1])[0];
      myIcon.appliedObjectStyle = myObjectStyle;
      myFound[i].remove ();
      }
   }
catch (e) {alert (e.message)}

Tags: InDesign

Similar Questions

  • Find the text and place the eps images

    Hello

    I have a lot of eps in the folder (eps001.eps, eps002.eps), but manually find the text in indesign [[[eps001.eps]]] and place corresponding image folder can someone help me

    Kind regards

    Barro

    Try this,

    var file = myArtFolder ("/ C / / numbers /" ""); Figure folder path

    var myArtFilesList = myArtFolder.getFiles ();

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = ' \ [------[------[. +------]------]------]';

    found = app.activeDocument.findGrep (true);

    for (j = 0; j< found.length;="">

    var foundText = .silence found [j];

    for (i = 0; i<>

    {

    "var artFile = ' [[[" + myArtFilesList [i] .name + ' "]]]"

    if(artFile==foundText)

    {

    found [j].insertionPoints.item (0) concerned (file (myArtFilesList [i]));

    }

    }

    }

    app.findGrepPreferences = app.changeGrepPreferences = null;

    I did not delete the text "[[[eps001.eps]]]...". "using script, you test and eventually remove it by using grep.

    Vandy

  • The back button often responds with a drop down menu of the story rather than simply go back to the previous page. There used to be a small arrow for that, why did you do that?

    The back button often responds with a drop down menu of the story rather than simply go back to the previous page. There used to be a small arrow for that, why did you do that?

    When I left click on the back instead of the browser navigation back button, I go almost every time to get the list of previous browsing history or it will just doing nothing until I click on the new button. The history of combination of button "return" rather than a separate between the historical click of the buttons box is the problem. Combined with my arthritic fingers of aging that is. If I was as fast as I used to be I guess it wouldn't be a problem. I liked the separate history area. This action combination navigation / buttons story scenario is problematic. I'm fairly certain that if I find it quite disturbing to bring to your attention that there are others (old beards) in the same boat I am.

    Thanks for listening
    D

    Use one of the following methods to open the tab history list:

    • Right-click on the back or next button
    • Press and hold the left button of the mouse on the active back or forward button until the list opens

    You can watch this extension:

  • How to configure CPU Meter so that it displays the image instead of the text version.

    How to configure CPU Meter so that it displays the image instead of the text version.

    Hi John,.

    Welcome to the Microsoft community.

    The CPU Meter gadget shows the status of the two main resources, you can follow on your computer - the use of your CPU and memory.

    To install the CPU Meter gadget in Windows 7, just right click anywhere on your desktop and click on Gadgets. Search the CPU Meter gadget and drag it to your desktop.

    See the Microsoft Article below and check if this is useful:

    http://Windows.Microsoft.com/en-us/Windows7/customize-desktop-gadgets

    Let us know if you encounter problems under windows in the future. We will be happy to help you.

  • fluid grid appears as his means to chrome and firefox, but in ie and safari the divs to display as a percentage of the entire screen, rather than as a percentage of the maximum width

    fluid grid appears as his means to chrome and firefox, but in ie and safari the divs to display as a percentage of the entire screen, rather than as a percentage of the maximum width

    I found the problem, thank you! nothing just a missing brace in the css that was causing the problem. the lines of code are numbered, and red when there is a problem (in cc at least 15). I could be the last to know that.

  • Find the text formatted in a paragraph

    Hello

    I have a problem with the search for a formatted text.

    I have a paragraph that contains two times a character style "Bold".

    For example:

    Lorem ipsum dolor sit amet, adipiscing elit computer. DUIs nisl eros, vehicula nec, elementum a nunc aliquam tincidunt.

    I want to find the text in bold and change.

    So, I'm looking for with the GREP code. + $ and style of character "Bold".

    If I click on find next, I get only the first character style but not the second.

    If I click Find Next again, I get the next character style in another paragraph. Not the second in the same paragraph.

    Can someone help me?

    Thank you very much!

    You asked to find a text in bold at the end of a paragraph with this request. Try it without the $

  • Can I display calendar as a list sorted by date rather than a grid (for example, the typical calendars)?

    Rather than the usual grid display, I would like to see all my calendar entries in a list, sorted by date, with those further in the future at the bottom of the list. Each line should include: date, name of the event, all the indicators, a link to an e-mail when it exists.

    Events and tasks (Alt - N)
    Check "Find Events".

  • A link rather than import images into Keynote

    Is there a way to link the images, rather than their import in Keynote? What I wan't is something like InDesign, so that every time I update a * psd or * png file, it will update automatically in Keynote. Instead of me having to remember each picture and replacing manually, is such a chore.

    Best regards

    Oskar

    Keynote is not related to image files, images must be placed on a slide so that the file is copied into the Keynote file.

    Keynote doesn't have a facility to update the images or other data when it is changed in the original file.

  • Firefox can't find the text on the HTML table cells

    Firefox cannot find (Ctrl + F) the text inside HTML tables, as in
    http://www.dip-Badajoz.es/BOP/ventana_anuncio.php?id_anuncio=22714 & FechaSolicitada = 2008-02-20
    If you try to search "Solano", Firefox will not find any matches, but "Solano" is here. This works fine on Chrome, for example.

    Thank you

    I am also on Linux, but if I start a version of Firefox 6 via Wine the I don't have a problem with a search for "Solano".

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Can we do "image moves with the text" the default behavior when you paste an image into a page of text?

    in a text in 'pages' document - copy - paste an image in a body of text automatically seems to do with 'image remains on the page' and 'automatic', which makes the image stays in place when later editing / adding text... so the picture does not end with the original text that belongs to it.

    Can we do the setting "Fix '-' with text Move' -' Inline with the text" setting by default, then it will automatically stick a new image without having to go through a few clicks every time?

    Thanks muchly, everyone who might have an idea

    Peter

    You can insert and to scale an image of your choice, set its object Placement and dressing of your choice and then do a placeholder image. You save then this as a model. When you create a new document based on this template, any image that you copy/paste or drag/drop on this placeholder image will now have your preferences of positioning of the object and the skin. Other that that, you cannot change the default settings of v5.6.1 Pages.

  • Find the text and apply the format paragraph tag in Framemaker 11

    Help!

    I am trying to automate the search text in a file FM11 and CE marking with a specific paragraph tag. Once it is, I want to be able to search for the same string again and delete it. The research will include wildcard characters. I'm moving Word files on and bring with manual numbering of paragraphs. Thus, when they arrive, they "2.3.4.5" before paragraphs for example. I want to search all of the numbers at the beginning of paragraphs, tag all those with the appropriate para format (starting a catalog) and then remove the manual numbering.

    At this time do us it manually, using find/replace and by using wildcard search strings to find (such as '\P[1-9]*.*.*.*[0-9]', which will find all the para numbering at the beginning of a paragraph 4-digit), then using the change option to paste to paste in a paragraph of the catalog tag. Then we repeat the same search and delete the text, leaving only the tag para to the number format. It works very well, but errors can occur if the search string in set incorrectly or if the numbers are not deleted (in this case, it is found on the next search and re-labeled incorrectly). For example

    I work for the Air Force collection of entries from the field and creating publications out of them, so there is no mobile profit here, just trying to be efficient. Any help is greatly appreciated!

    Thanks in advance

    b

    Hi Brian,.

    I guess right here because I've never done this before, but... In my view, there is definitely something wrong with your mission to find the property values. The way you wrote, you are trying to assign two properties to a single table space. That's why you need to remove these two lines to make him find work, because they are replacing the FindText property apparently. Here is my proposal for how it should be:

    findParams = AllocatePropVals (2);

    findParams [0].propIdent.num = Constants.FS_FindText;

    findParams [0].propVal.valType = Constants.FT_String;

    findParams [0].propVal.sval = searchString.

    findParams [1].propIdent.num = Constants.FS_FindCustomizationFlags;

    findParams [1].propVal.valType = Constants.FT_Integer;

    findParams [1].propVal.ival = Constants.FF_FIND_USE_WILDCARDS;

    In any case, let me point out again once it is a hypothesis and I did not test this. I am sure, however, that the solution is somewhere along this path.

    Russ

  • How can I force a download rather than open a preview of the file of the file a hyperlink?

    When I hyperlink a file (pdf, txt, etc.) it opens a preview of the file, rather than just start downloading, I wonder how to achieve this.

    Example of what I want to do...

    https://www.Google.com/chrome/browser/desktop/index.html

    When you click on "Download Chrome", it opens a window asking if you want to download, then when you click Yes it downloads the file.

    I would like to do exactly that, or force the download immediately, without popup dialog box.

    Thank you!

    You can use the attribute of HTML5 download like this: http://www.w3schools.com/tags/att_a_download.asp

    Click here to download

    For more details: HTML download attribute

  • GREP - Positive look behind - find the text beyond the space

    I have a GREP in a paragraph with a positive Outlook style behind. This research finds the characters up to a space and apply a style, but applies style beyond a space.

    What should I include in my GREP search to find text following a space? TIA

    Right. He finds only upper case and lower case letters, while the game ends on what is not one of these. Do you want to match the end of the paragraph? You can use (?.)<>

    for two words use (?)<>

    for a game for one or two words (two if there are two, otherwise only one), try (?.)<=\#)[\l\u]+(\s[\l\u]+)? (not="">

  • Expression to replace the image according to the text of the layer.

    Hello, I wanted to ask you is it possible to replace the image in the function composition text text layer. That is the text layer contains code # 34 and expression indicates what kind of image should be placed according to conditions in expression of image.

    Sincerely, Deimantas

    Hello

    Expressions can not add/replace images.

    All images must be here somewhere, in the form of layers in the model or in a precomp, but not only as items in the project Panel.

    Then you can play with the opacity of these layers, with an expression of opacity to each of them:

    textLayer = (pickwhip the text layer that transports information);

    If (textLayer.sourceText == thisLayer.name) 100

    0 otherwise;

    The condition can be something different, for example "if (textLayer.sourceText is thisLayer.index"), etc, etc.

    Not clear what should be this condition in your case.

    Xavier.

  • Add padding to the right of the image without losing the text wrapping

    On the right side of my page (to half way down), I have an excerpts from my blog. It has a picture of 80 x 80 and a title and a text to present to the right of it.  There is no space between the text and the image, but the text fits correctly.  I wanted to put some padding (maybe two pixels) to the right of the image to create a space but which requires the text under the image instead of to the right of it.

    What is the good CSS for it?

    http://www.littleriverbedandbreakfast.com/LittleRiverBBresponsive/index.html

    The filling is internal to an element. If you have a container 80 pixels and add a pixel 5 padding, your container will be 90 pixels wide.

    Margin is external to the element. If you add a margin of 5 pixels to a container of 80 pixels, the container remains 80 pixels and has an area of 5 pixels around it.

    I would like to add an attribute of the margin on the right css to images.

    {.imgleft}

    float: left;

    margin-right: 5px;

    }

    Or something like that.

Maybe you are looking for

  • Satellite A300 can not recover vista

    I had with vista preinstalled, and now I formatted partition 1, leaving the 2 with the toshiba recovery partition on this subject. How can I return my original vista walk now? I tried f12, but it does not work nothing when I click on HARD drive

  • Use the toggle button to simulate the Ctrl key now

    Hello I saw someone asked something very similar before, but nobody seemed to know the solution. I was wondering if it is possible to use a toggle button to simulate the CTRL key now, the idea being that the user could then zoom in on a rectangle of

  • V.2002 of MS Windows XP Pro SP2 OEM from Newegg in 2006 would not agree on shrinkwrap product key during installation

    I bought v.2002 of MS Windows XP Pro SP2 OEM from Newegg in 2006.  She would never accept the product key during the installation on his blister.  To complete the installation, I used a different key of a second OEM disk, and it worked.  It's been a

  • 0 x 80070001

    Impossible to reinstall Windows vista on my dell vostro A860 laptop. the message I get is can not the device driver and when I insert the device driver CD it does not find the drivers

  • Graphics and video clips

    Hi, I recently changed a battery for my laptop and also got the latest version of windows.  Right after that, I noticed that I don't see that new videos as I used to.  The graphic on the screen becomes messy looking and I only hear the news.  How can