Application of styles to place assest of AppleScript. CS5.5

We run a script based on a csv, loads of the various components of a library then import XML file.  An example of these elements could be designed to have 4 point separate folders that it contains and each record element may contain multiple text boxes and an image, and each of these elements have xml tags.  To better understand, think a circular supermarket where they have 4 items of meat in a section with a description, size, price and image.  We have it divided into different sections and based on data from our database we can relate to a specific item in our library of indesign and how many items will have to be loaded in this section.  This all works very well so far and is pretty cool, how it loads but we seek to pass maybe a theme of basic page which could be both object and paragraph styles so we would like to apply these styles through our script because it is possible that different elements may have different styles in the same load or same same elements could be reused in the same loading and have different styles so really cannot set elements with styles we want or associate benefits specific to styles xml because may be different in each element.

I can in Applescript apply paragraph styles and object to each index as applying style x, paragraph 1, but would like to do to the item we have placed on the page.  Here is an example of our script to perhaps better understand.  Look for reviews where we place our assets (items) on the page.  Research how we can apply the style to say in paragraph 1 or block of text 1 of said placedAsset could not get the block of text 1 or of paragraph 1 of the xxx group.

I tried variations of:

Tell application "Adobe InDesign CS5.5"
Set myDocument to the active document
the value mapping page active of the active window
the placedAsset value to set the element element '7' of the library "GT.indl" of myDocument
move placedAsset to {0.65, 0.6}
tell myDocument
paragraph style "Style1" myStyle value
Set objStyle object style "objStyle.
-This works for the proper application of styles by index
tell paragraph 1 of the text block 1
apply the paragraph style using myStyle
tell the end
say the text block 1
apply an object style using objStyle
tell the end
-It gives the error described above
say the text block 1 of placedAsset
apply an object style using objStyle
tell the end
tell the end
tell the end

----------------------------------------------------------------------------------------
Script that runs now, but not is not set to apply styles again:

----------------------------------------------------------------------------------------

Try
CSVstr the value "Please locate your CSV file...". »
CSV_File (choose the quick file with CSVstr) the value in text form
the value csvData read file CSV_File
paragraphs of the csvData value csvEntries
Tell application "Adobe InDesign CS5.5"
Set myDocument to the active document
say XML display preferences
attributes see the value false
together to show the structure to true
Seeing the false image tag
See the tag markers set to false
snippets of text see the true value
tell the end
say XML import preferences
together to help transform false
game link to XML to false
set ignore entering unmatched true
together to ignore white space to true
Set the tables import LICENSES
style of play import to merge import
import text value in the tables to false
the selected import false value
together to remove old unmatched to false
the text elements repeat the true value
tell the end
the value mapping page active of the active window
the text value of the point delimiters AppleScript «»
Repeat with i from 1 to the count of csvEntries
the value csvEntry point of csvEntries I have
the value {fldElement, fldLocationX, fldLocationY} csvEntry text elements
-display the dialog fldElement
Set placedAsset to myDocument active asset fldElement of the library 'GTElements.indl '.
move placedAsset to {fldLocationX, fldLocationY}
-This is where we would like to apply styles to the active content placed. This placed asset will have a few blocks of text and to
-an image less.  We would go just from the additional fields in our CSV with names of styles to be applied


end repeat
the text value of the point AppleScript delimiters {""}

tell myDocument
XMLstr value "Please locate your XML file...". »
Define XML_File (choose file with guest XMLstr)
Import XML XML_File
tell the end
Tell application "Adobe InDesign CS5.5"
set preferences for text search for nothing
set text preferences change for nothing
game to find what to find text preferences to 'mykzlplx '.
Set text preferences changing changing for «»
tell the active document
change the text
tell the end
set preferences for text search for nothing
set text preferences change for nothing
game find what text preferences to 'A '.
Set text preferences changing changing for «»
tell the active document
change the text
tell the end
set preferences for text search for nothing
set text preferences change for nothing

tell the end

tell the end
try to end

It would be much easier to help if you were more succinct. You should practice reduce the problem to the smallest possible case he shows. It is a good skill for two reasons: (1) it makes it easier to find the problem yourself (2) it makes it easier for others to help you.

I think your problem is that you ask for the first of the well-placed textframe:

the placedAsset value to set the element element '7' of the library "GT.indl" of myDocument

tell myDocument
-It gives the error described above


say the text block 1 of placedAsset
apply an object style using objStyle
tell the end
tell the end
tell the end

At least in JavaScript, the command returns an array of objects, regardless of the type. I suspect it is true as well.

So, you probably want something like 'first element of placedAsset to say' rather than "text-frame 1". And if you want to make sure that it is a block of text, because there are other things in the placedAsset, you will need to use a filter. ("first element of placedAsset whose constructor is textFrame" or something like that).

Again, my applescript is really rusty, but I think that's the general idea.

Tags: InDesign

Similar Questions

  • Search the text of paragraph style and place them in the new text block with width 50mm

    Hello

    I'm looking for voor a paragraph to find script dat styles and place them in a new text block with width 50 mm.

    Is there a solution?

    Kind regards

    Patrick

    Width: options General of the frame of the text, GBA: fixed width, then 50mm width

    Height: automatic block text size options

    (These two in the dialog box object styles)

  • We can run 'Maintain instant information' while Applications ERP is in PLACE

    Hello

    We would like to know if we can run "Maintain snapshot information", while Applications ERP is in PLACE and connected users.

    Thank you,

    We would like to know if we can run "Maintain snapshot information", while Applications ERP is in PLACE and connected users.

    Yes, it can run while the system is installed.

    Thank you
    JD

  • I created a file in Photoshop CS5 (photo) and another in Illustrator CS5 (a graph) to place in my InDesign CS5 brochure. When Photoshop and Illustrator files are placed in InDesign, they seem blurry - read in InDesign, printed or saved as

    I created a file in Photoshop CS5 (photo) and another in Illustrator CS5 (a graph) to place in my InDesign CS5 brochure. When Photoshop and Illustrator files are placed in InDesign, they seem blurry - read in InDesign, printed or saved in PDF format. Can someone give me some advice on how to fix this? Thank you!

    View blurry in InDesign: choose View > display performance > high quality screen

    Blurry printing InDesign: Choose file > print > graphics > Images > data send: all

    Fuzzy in PDF format: fix above points first. make sure that the links are up-to-date; post a screenshot here your PDF export settings.

  • ADF: Application CSS style Af:Tree root nodes

    Hey everybody,

    I am building a tree hierarchy in 12.1.3 for our navigation menu, for the purpose of loading dynamically link names, responsibilities and the URLs of a database table. The tree itself works fine, but I was hoping style it such that I could get the root nodes to watch, if it does not behave like a panelaccordion component. The problem is that I can't find a property in JDev which applies to any kind of style just for links (HR, Support, Admin, etc.) top-level menu that I could then, go to a style sheet and target these nodes separately. All links only seems to have a generic span tag.

    Anyone knows a way to do this, targeting only the top-level nodes in CSS, using the skin editor or another property of af: tree? Thank you for your time!

    You can use a bean class to determine the p if the node if a node root (getParent() == null) and sign the style of the bean.

    Use the property class of the tree style and that it points to a bean method that returns a string that represents the style for the node class.

    Timo

  • Application error in the Place order page

    Hi all

    IStore site I got 'Error of Application' in the page "order" for some customers, but other clients work very well, and I checked the log file indicates CC holder is 'Null '. So please give an idea on this issue.

    java.lang.NullPointerException
    to
    oracle.apps.ibe.shoppingcart.quote.ShoppingCart.savePaymentInformation
    (S
    hoppingCart.java:4077)
    to
    oracle.apps.ibe.shoppingcart.quote.ShoppingCart.savePaymentInformation
    (S
    hoppingCart.java:3819)
    to
    oracle.apps.ibe.shoppingcart.quote.ShoppingCart.saveCCPayment (Shopping
    It
    UTI Java:4412)
    to
    OA_html.__ibeCCkpBHdrBillPay._jspService (__ibeCCkpBHdrBi
    He's
    Pay.Java:2280)
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
    to
    oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
    at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
    at oracle.jsp.JspServlet.service(JspServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    to
    org.apache.jserv.JServConnection.processRequest (JServConnection.java:4
    56
    )
    to
    org.apache.jserv.JServConnection.run(JServConnection.java:294)
    to the java.lang.Thread.run(Thread.java:595)
    thank you
    Bala

    Bala,

    Most likely you need to clear the server cache or to compile pages JSP (depends on your version of the application) - please see (11.5.0/12: Oracle iStore Checkout error: "Error 500 internal server OracleJSP" [577510.1 ID]) for more details.

    Thank you
    Hussein

  • Styles of abolition applied with AppleScript

    In QuarkXPress is has been able to remove styles with:

    history subsections 1 current box style sheet set to null

    When I try something similar in InDesign, you use:

    set the character style applied characters in the history of the mother of myFrame "[None]".

    I get an error saying that "Adobe InDesign CS5.5 was an error: invalid value for the set property 'applied the style of character'." Character style expected or string, but received "[None]".

    "[None]" is the name of a Style of character, but for some reason sheet any, it looks that InDesign does not recognize it as such. Does anyone know how to remove the text style sheets?

    You need get the character style [none] of the parent document which contains history.

    Try

    the value applied character style of parent story of myFrame to style character "[None]" to parent from the parent history of myFrame

  • Keyborad application of styles?

    Except you assign a hotkey to a style, is there a way to apply a style of paragraph of the keyboard?

    He feels terribly close.

    Type and select the text and press command - F11 (paragraph Styles), and the paragraph Styles Panel is centered. I can then / top down arrow to choose a style, but what then? How can I apply it to the selected text, without a mouse click? Do not enter or space left/right arrow or what that what else I have ever tried seem to do.

    But why down work of arrow if you don't commit end your selection almost?

    Is this just a UI wart, or am I missing something?

    You are not missing anything, it can not be done with the method you described.

  • Language - Applescript - CS5 options

    In the InDesign menu > Preferences > dictionary, you can choose a language and in the section below, choose a few options for that language. Via Applescript, I want to choose the right double quote symbols to use. I found a class named 'language' and the property 'double quotes (text)' but I can't find the proper syntax to do the job.

    Any idea?

    Best regards, Peter

    Shane,

    Yes, it works, thank you very much!

    Peter

  • Need help to place Duotone PSD in CS5 I'LL

    Hello

    I use Illustrator CS5 ver.15.0.2. I created a Duotone image in Photoshop CS5, from an image in grayscale, changed the mode of image duoton and assigned 2 different PMS colors. Saved in Photoshop format. When I tried to place the image in the wrong, I got the message "the file is not readable" in a dialog box. I tried to copy and paste the image and also the sheet and drop the DSP to the ILL, nothing happened. Tried to delete the files com.adobe.illustrator.plist and "Adobe Illustrator CS5 Settings" folder preferences and LOT restarted, problem persists. None of my colleagues has been able to place an image Duotone PSD ILL. However, my salesman was able to place a Duotone PSD ILL. In addition, I was not able to open a PATIENT from my provider with a placed image to Duotone PSD.

    I left the comment in the help of Illustrator page, see link below, moderators adobe weren't able to give me an answer.

    http://help.Adobe.com/en_US/Illustrator/CS/using/WS714a382cdf7d304e7e07d0100196cbc5f-6565a .html

    Any help is appreciated.

    James

    You must have the new facility in Pantone Color Bridge libraries, but select coated or uncoated Pantone Pantone as your library. Change of color coated bridge or bridge color uncoated in Photoshop Save under a different name use the same colors, of course. Then that place in Illustrator. Here's the new formuals for done pantone colors and I think that they display more accurately on the screen.

    If you hae new libraries installed and you try to use the 'old' you get this message from Illustrator.

    If you don't have these new libraries installed as probably your printer did not it may so yu have to install and then you would use Color Bridge as described above.

    Color Bridge library seems to settle on any version, but I am not sure that it is backward compatible with the versions of Illustrator who not have it installed.

    So do and send two copies to the printer and explain that we use Color Bridge.

    Funny originally I used the color + coating and I couldn't place it now I used it after crossing the bridge of color and that works as well. Go figure.

  • Place a PDF in CS5 - worked in CS4!

    Hello

    Here is an excerpt from a script that puts a PDF into an image on a page, he worked in CS4, but it has broken in CS5. Everything works in the development of the PDF - error message indicates error: error-1708 string ' Insert: path to the PDF document "does not understand the message of the place.

    Here is the script...


    tell the active document
    -to make the layers
    myLayer to layer with properties the value {name: 'impo-PDF', layer color: red, visible: true}

    tell the end

    Repeat with x from 1 to pageCountPDF

    the value mapping page x of the active document

    -to define pdf import options
    The page number of the place PDF to x the value preferences
    the value of culture PDF preferences place PDF to the media of cultures
    set the transparent background of the place PDF false preferences

    -begin to place the PDF file
    -set the size of the image
    lhboxBounds value {0, 0, 312, 111}

    say to myPage
    myRectangle make rectangle with properties the value {geometric limits: lhboxBounds, fill color: 'None', line color: 'None', accident stroke weight: 0}
    -Rotate the pdf?
    myPlacedPDF1 to place thePDF with properties the value {rotation angle: + 90 myPDFrotation} on myRectangle
    the value myPlacedPDF1 to article 1 of the myPlacedPDF1
    -reposition PDF in framework
    adapt myRectangle content Center

    -dupe framework
    move (in double myRectangle) by {111, 0}
    move (in double myRectangle) by {222, 0}
    move (in double myRectangle) by {333, 0}

    tell the end


    Any help would be great as I can't find anything on this

    Thank you very much

    LJ

    Try changing to «set myPlacedPDF1 to place the alias thePDF...» "It seems that CS5 will not accept just a path for the command of the place.

    The Dictionary says clearly the string or alias, so you should report it as a bug.

    That said, provide aliases and files rather than strings is a good habit to get.

  • Please close the Applications of set-aside to continue: Adobe Bridge CS5

    GAHH!

    Adobe Premiere doesn't download, because he thinks that 'Bridge' is open! I EVEN CHECKED TASK! IS NOT! This happens every time... but somehow I seemed to have solved it... twice...

    HOW CAN I SOLVE THIS PROBLEM

    I get to the second to last part - 'Installation' AND IT WONT DOWNLOAD (Trail Version) WHAT. DO. I. DO?

    SA MAKES ME CRAAAAAAAAAAAAAZZZZZZZZZZZZZZZYYYYYYYYYYYYY C-R-A-Z-Y!

    If you see no bridge in the taskbar, open the task manager of > process and verification of an element of it there.

    You can also stop the bridge from loading at startup, using MSCONFIG > startup or MSCONFIG > Services.

    Good luck

    Hunt

  • How can I place an indd - just the text file?

    Hello.

    This is a snippet of my code.

    var tfiImport = File("C:/Users/Me/Documents/YS/Exported Stories/YS_full_pg.indd");
            tfYS[0].insertionPoints.item(-1).place(tfiImport);
    
    

    I'm trying to import an indd file in a pre-existing text block. The framework becomes excess, because the indd file is placed in actual size.

    The indd is a text file with different styles applied. I just want retrieve this text with styles and place it in my text, auto to flow if necessary.

    How can I do?

    Any help would be appreciated.

    Hi SK,

    you would open the InDesign document and duplicate the text at your insertion point.

    Both documents are open.

    The insertion point where you want to "place" the formatted text is selected.

    There is at least a block of text with a paragraph in the document where you want to duplicate.

    Example:

    var targetDocument = app.documents[0]; // The active document
    var sourceDocument = app.documents[1];
    
    var targetInsertionPoint = app.selection[0].insertionPoints[0];
    
    sourceDocument.textFrames[0].paragraphs[0].duplicate(LocationOptions.AFTER,targetInsertionPoint);
    

    Example:

    To duplicate the whole text of a story where you know a block of text of this story:

    sourceDocument.textFrames[0].parentStory.texts[0].duplicate(LocationOptions.AFTER,targetInsertionPoint);
    

    Search for the text in the documentation for DOM object and its methods.

    Adobe InDesign CS6 (8,0) object model JS: text

    Also app.open () method:

    Adobe InDesign CS6 (8,0) object model JS: Application

    Uwe

  • Automate the character styles?

    Tuesday morning, I sit and one hundred and fifty summer events to pop in a leaflet. Choice is easy - I can print them and type them. In the shower, however, I started thinking about choice B, and I don't know if InDesign can do what I want.

    I have control over the database where they are hosted, and it is quite easy for me to pop in the format

    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~

    What is all the information I need on this document. On the finished product, I'll Date and time to have character styles applied (for color and weight). It is not difficult for me to assign keys quick access to styles of character and to make this hand - twenty minutes of boredom.

    But!

    Could format that

    (where the symbols are just unique symbols)

    ~~~~~~~~~~~~~
    ªDate - ∞ £ time [CR]
    Name of the event
    ~~~~~~~~~~~~~

    and then use a find/replace to tell InDesign

    -in the case of 'ª... ". ∞ ", apply the style of character 'Style of Date'

    -in the case of "£...", apply the style of character 'Time style' "

    and then go through and remove all instances of ª ∞, £ and

    ?

    (Additional spaces applied for ease of reading)

    Or, if I'm imagining this wrong, is there another way I can format the original data to automate the application of styles?

    Even I don't think that you would need to grep for that.

    I would create two paragraph styles, one for the date and time with the following style being the name of the event and the name of the event, including the next style time.

    Then create a character for the time style and have the paragraph style base for date/time, or just for the date of the formatting you want.

    The style of time date would have a style nested with none by the hyphen and the time until the end of the paragraph.

    Place the text and then select everything from him and in paragraph styles, right panel click on time and in the context menu, choose apply date/time and following.

    Who must fully put in shape all your text.

    Bob

  • I'm having problems to make one of the 3rd party fitness on my watch applications

    I'm having a lot of trouble getting my watch to load up one of the applications of 3rd party fitness. Apps for example Strava & Wahoo fitness... In particular, two applications have support iwatch announced when download you from the App store. You don't know if there is a problem with my watch or not because I recently bought a wahoo HRM ability that has the Bluetooth, etc & I paired with my phone, but trying to make a pair of Bluetooth with my watch looking for Bluetooth 'of health devices"it captures anything. I tried to obtain the support of Strava thinking it was their app, but I did exactly what they said to do IE désapparier shows, to remove and reinstall app & his continues to do exactly the same thing. Both apps show on my watch, but when I select to load just makes the circle of reflection and then the app is de-energized so it brings back me to the screen of application on my watch. I've updated my privacy settings to let my watch & the apps read each other, but still does not.

    Hello

    If you have not already done so, it can help to upgrade your iPhone and Apple Watch to the latest version of the software.

    If not, try the following steps, trying to open the application after each:

    • Place your Apple Watch on its charger with power connected and also connect your iPhone to the power.
    • On your iPhone: open the music application and start playing a song (through your iPhone pregnant is fine).
    • On your iPhone, in the application of the watch, go to: My Watch (tab) > scroll down and tap the name of the application that does not open > turn off the option to show App on Apple Watch > to pause for a few moments > turn on the option.

    If this does not resolve the problem, the other recommended steps is trying to disconnect and rematching of your watch. As you've already tried this, you can ignore this:

    More information:

    Get help with applications on your Apple Watch - Apple Support

Maybe you are looking for

  • Equium M70-PSM77E connection problem: Garmin GPSMAP 60CS

    I use Memory Map and I have a Garmin GPSMAP 60CS, for some reason some in recent weeks, I can't transfer routes and trademarks etc. from the laptop to the GPS. A message pops up saying unknown Garmin.I tried put in place and that you have downloaded

  • Configuration of ICS in Vista or WIndows 7 - INternet connection sharing

    I share my internet connection in our House with the following: 1 set up ICS in XP 2. wireless broadband - it's my internet connection source 3. wireless AP - that's where I connect other devices at home to connect above, the installer is ok when usi

  • SPA3102 download limits?

    My internet connection speed is improved from 8 to 12 MB/s. With the connected 3102 as a router, my speed is limited to 7.5 Mbps. When I connect my old router, the speed increases up to about 12 MB/s. That's why I thought that the SPA 3102 download s

  • Problems Windows has just started.

    I was currently using vista windows on a computer hp laptop. He began to spoil with various problems of internet connection and not pick up on the drivers. I was told to use System Mechanic, which lead to all my files are completely erased. I don't h

  • Hello I can not connect using the camera Nikon D5 me please

    Hello I can not connect using the camera Nikon D5 me please :)))I've heard say that some work and I can not connect! Can someone help me to write on this topic?