object style export extracted naming

In my still images of text document object, I want to export like excerpts

but in this specification in the paragraph style, but also get the name of the snippet

I wrote a code for it, but the results frustrated

var myDoc = app.activeDocument; 
for(var p=0; p<myDoc.pages.length; p++)
{
    for(var i =0;i<myDoc.pages[p].textFrames.length;i++)  
    {
        var myFrame = myDoc.pages[p].textFrames[i];
            app.findGrepPreferences = app.changeGrepPreferences = null;  
            app.findGrepPreferences.findWhat = ".+";  
            app.findGrepPreferences.appliedParagraphStyle = myParS; 
var mySearch = myFrame[i].findGrep();
for(j=0; j<mySearch.length; j++)  
{
        if(myFrame.appliedObjectStyle == tmc) {
            myFrame.exportFile(ExportFormat.INDESIGN_SNIPPET, File("d:\\Yeni\\"+  mySearch[j] + ".idms"));
}
}
}
}


I hope this help you

var myDoc = app.activeDocument;
var myItems= myDoc.allPageItems;

var J = myItems.length;

while( J-- ){
    var mItem = myItems[J];
    if (mItem.constructor instanceof TextFrame) {
        if(mItem.appliedObjectStyle.name =="tmc"){
            app.findGrepPreferences = app.changeGrepPreferences = null;
            app.findGrepPreferences.findWhat = "\\d{4}";
            app.findGrepPreferences.appliedParagraphStyle = "myParS";
            var mySearch = mItem.findGrep();
            if (mySearch.length ==1){
                if (mItem.parent instanceof Group){
                    mItem.parent.exportFile(ExportFormat.INDESIGN_SNIPPET, File("~/Desktop/"+  mySearch[0].contents + ".idms"));
                }else{
                    mItem.exportFile(ExportFormat.INDESIGN_SNIPPET, File("~/Desktop/"+  mySearch[0].contents + ".idms"));
                }
            }
        }
    }
}

Tags: InDesign

Similar Questions

  • Object Style options is missing options that exist in the Options of the Export Object

    I noticed that when I select the object Export Options, there are more options available than in the object (InDesign CC 2014, Build 10.0.0.70) Style of Options. In particular, I am interested on the options for custom CSS width and height. It would be much easier to create an object style with custom CSS width and height values that define the same setting for each object separately. Any reason why this is so? I don't know no personal Adobe following these forums but I hope they see this gap in their product.

    object_export_options.jpg

    object_style_options.jpg

    Hi changilainen2,

    Yes, we follow the Adobe Forum!

    Thank you for your contributions. Actually implement this feature we were bit confused if it is more important to have these options in the object Styles. This is why you are missing here.

    But comments from you and a few other people, made us realize that we should have it in object styles too.

    Thank you that we will try to integrate this into the feature.

    ~ Monica.

  • Can I add indesign object styles to my creative cloud library?

    I have an object style that I use on the screenshots in my InDesign documents to give them a shadow and rounded striped black mount.

    I normally keep this style in my template, but once from time to time I like to use in another document which is not based on this model, so I usually have open, copy and paste the screenshot with the object in my new document style and then reapply the style of the object (which is imported) for the desired screenshot.

    I was wondering, with the integration of libraries CC in InDesign, I could save the style of the object directly to the library?
    I noticed that if I drag the screenshot in my CC library, he adds, in the form of a graph (bringing the object style), so basically, all I have to do is to capture the screenshot of my library, place it on the page, delete it and then use the style of the any object that is left behind on my screenshot desired.

    I was just wondering if directly add JUST THE STYLE of OBJECT (like you do with character or paragraph styles) is feasible now. It doesn't seem so, but maybe in future releases?

    Thank you

    Object styles are not moveable in CC libraries. Do not forget, that the function is cross-application (also works with Illustrator CC, CC of Photoshop and other applications). Libraries of InDesign objects are necessarily InDesign only.

    But you have found the best solution: when you drag an InDesign object, it copies an extract file (which contains all styles) and a PDF file in the CC library. An application like Illustrator or Photoshop can set the PDF file, the extract is used when copying to InDesign. It will add the Style to the object if you move it to another InDesign file.

  • Object Style Manager: How to import styles into of CP7 CP8

    Here's my problem:

    1. I open a Captivate file created in CP7
    2. I have it save it under a different filename in CP8
    3. I create a new object Style--say a text caption
    4. I export the Style - I tried just the new style, all styles, all styles for all objects.
    5. I create a new file CP8, save it.
    6. I try and import the styles exported in step 4 and get the error: "cannot import Styles.The you try to import a style file exported from an earlier version of Captivate.

    I don't understand. I opened the file CP7 and re-recorded it with a new name in CP8 in a different location.

    What is the problem?

    OK, I finally have an answer:

    1. Open the CP7 file with default & custom styles
    2. Copy all slides
    3. Create the new file CP8 & save
    4. Paste all of the slides in this new file & save
    5. Object Style Manager: export all styles of all objects
    6. Create / open a file CP8
    7. Object Style Manager: import templates created in step 5
  • I created an object style to set the distance of the legend of my photos, but the distance is not consistent from one image to the image.

    I create a complex book with many images and chapters.

    I created the object styles to compensate for the distance the images for legends, but the distance changes according to how the image is adjusted within the framework and I don't know what dictates change. Anyone have any ideas?

    Thank you.

    I have not marked as correct answer because it is not related to what you have actually done, which has been reset to the scale. Your problem seems to come from having defined preference generally by climbing, adjust the percentage.

    Frankly, I think it is a bug.

  • Find an object with an object style and increase its height! …

    Hi all

    I found each (anchored to the current text) 'invisible' block with a specific 'AA' object style and change its height SO its offset is > 180 (depending on the origin 0,0 page by default).

    This seems to be simple but, still, who doesn't!

    Thanks in advance!

    (^/)

    app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "xxx");
      
    function main()
    {  
      
    app.findObjectPreferences = null; 
    app.findObjectPreferences.appliedObjectStyles = "AA"; 
    myFound = app.activeDocument.findObject();
    
    
    for (i = 0; i < myFound.length; i++)  
         {  
            var myGB = myFound.geometricBounds;
            var myYOffset = myGB[2]; 
            var myHeight = myGB[2] - myGB[0]; 
            
            if (myYOffset[i] > 180) myHeight[i] += 90; 
         }  
    
    }
    

    Replace this:

    myFound.geometricBounds

    with this:

    .geometricBounds myFound [i]

    You must then change the geometricBounds and apply it to the object:

    myGB =...

    myFound [i] .geometricBounds = myGB

    Something in this direction.

    Peter

  • 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...

  • best judgment for paragraph styles, object styles and character styles

    I want to learn the criteria difference and use of paragraph styles, object styles and character styles. I know how to use them, but know about the best judgment and context, when you use would be better. Can anyone recommend links? I've been using adobe. Please don't suggest books.

    Paragraph styles are whole paragraphs.

    Character styles are letters or isolated words. Do not use the long of an entire paragraph. Do not set all the attributes, only those who are different for the properties of the paragraph Style. Unlike Quark Xpress, in InDesign are character Styles used only for the difference of isolated words.

    Paragraph styles can include the character automatically Style: Styles, GREP, nested Styles, initial letters, chips automatic & numbers and line styles.

    Object styles , set the frame of the object. They include separate definitions of all of the object, the stroke and fill.

    Object styles can also be applied to images in a frame and groups.

    Object styles may also include in the following paragraph Style and a style of paragraphs in automatic way.

    Object styles have several categories, you can choose which category is relevant to apply. For example, it is possible to apply the first style object to give the stroke and fill and apply a different object style to format the corners only and then apply the next. (With this method last only the applied object Style is linked).

    Styles of the opportunity to make global changes in a document. If you build in a smart way, they are a huge time saver. They can be stored in the CC libraries or libraries with objects that are applied to them. If you have created once these styles, you can use them again, and with one or two clicks, you can make their own to new document.

    My recommendation: the habit of Styles, name them always with the same names that it helps you to be accustomed to them and to work faster, much faster.

    There are more models: Table Styles, Styles of cell, the Master Pages and color chart.

  • Cannot add an object style to the library directly

    I can't add an object style from by dragging a style object to an indesign Library palette. Is this normal?

    That is to say, to add an object style to the library, I have to drag an object that has this particular style of my my indesign library. Right?

    Yes, it's true. Failed to add to a library of object Styles, but adding an object.

    Add any object adds an object Style, Object Styles depending on the occasion, used the paragraph and character and the name Layer Styles Styles.

  • 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.

  • Object styles cannot be deleted

    I use 8 Captivate and there is some object styles I want to remove the file that I can't. Does anyone know a workaround for this?

    3333.png

    These styles with brackets around them are default object styles.  You will not be able to remove them.  It seems that the project has been created using a German version of Captivate?  Is this likely?

  • The bubbles... using object styles

    Hi all! I took over a project in InDesign that was created by another designer. It's something I can't understand. There is a graph. And behind the text of the "bubbles". These are created using the object styles. The sentence I feel, is that when I merge the bubbles, mine out differently to what they were doing. And I can't for the life of figure me out how to do what they were doing. Any suggestions would be greatly appreciated.

    Basically, it's the 'corners' which are the cause. When I merge the two bubbles, there is a small dip. But when they merged their, it comes out instead of in. See what I mean below. I can't quite explain it with words.bubbles copy.jpg

    In my suggestion rounded corner effect = Option of round corner. My point is: the order in which you merge forms and apply rounded corners will have different results.

  • 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.

  • Default object style is not applied

    I use InDesign CS6 on Windows 7. I have a newsletter that I throw quarterly, which contains a lot of pictures. I always feel like my photos using a Style of particular object and in the pane object Styles-> graphic block default Style, I confirmed that the style I want is set as the default. But when I drag in each new photo (or use file-> Place), it always starts as "[no] + ', which means no selected style but only a few replacements. I have no idea where he had the idea to do and selected style each time getting boring over the years. Any suggestions on how to solve this?

    This is a long-standing bug. The style is hard coded, apparently, for the tool framework so normal selected object never styles are applied when you place or no drawing a frame.

    There is an undocumented feature added in CS4 (and it has always worked until CS6 - did not check in more recent versions) which resolves this problem partly. If you create an object called Frame Gun on-site style will apply to new frameworks created by placing (but not to the frameworks you draw first). http://InDesignSecrets.com/applying-an-object-style-when-placing-an-image.php

  • New Document window are missing when you open the new document, along with other menu items: object style, the effect controls panel, etc.

    Miss me a lot of items, it seems that in my InDesign program.  How can this be?  I'm taking a class at the local college (inDesign CS6), and when you go through the book and steps, I keep noticing that I'm missing things.  For example: when I open a new Document - No new window does not appear on my screen, and there is no way to change the page size, etc. that appears. (2.) there is no object Styles Panel - window > Styles > Styles object - but the option object Styles does not exist.  3.) there are no available effects Panel, either. As I continue the race, things keep getting showing like that.  What is going on?  I do not have something wrong; My instructor verified that indeed these things seem to be missing.  I bought the Adobe Creative Suite 6 Design & Web Premium disc for Windows operating system.  Help, please!

    I had problems to install the drive, but thanks to someone in the forum, I have put everything on the desktop and installed in this way.  What why what is happening?

    In fact, you must return to the extensions Manager in all cases and make sure that all of the Adobe extensions are checked on.

Maybe you are looking for

  • don't start black screen no logo

    Recently I have just returned from overseas and I put my mac in the luggage for the trip, but now when I start it up, the screen goes black, there is always the sound, the keyboard works fine, logo on the back shines in not, I tried to reset the PRAM

  • HP Pavilion dv6 Notebook PC: wifi cuts out occasionally and will reconnect only as administrator

    My wifi is de-energized occationally and almost a year. the only way to re-establish the connection must go through as an administrator. but I sometimes do a reboot just to get the next Administrator option. HP has updated my drivers a month ago but

  • Digital magnification of output using USB-6211

    Hello I'm trying to use the example of LV "Cont writing dig port - Int clk.vi" to generate a model. But I get the error-200077 on the sample clock. The popup error message suggests using "we demand", but it doesn't have the choice with the DAQmx. Any

  • My 8 GB rocket is now a rocket of MB 7800

    My rocket froze the other day and I couldn't have it thawed. After checking the Sansa.com, I downloaded and installed the firmware update. After that the player was not frozen over, but my drive was empty. I started to recharge it but about 100 songs

  • Palm Pre calendar, screen saver and Conference questions

    Hello I am a Palm Pre (Sprint) 1.4 and the Palm Pre Plus (verizon) 1.4 user.  I use the EAS option to connect to my company groupware system.  I have two problems, I need help: 1. on the Sprint and Verizon, location of the grille section seems to off