Script label inside of continuous text?

Hi there,
is there a way to add meta data to the content of text boxes or table cells?
I've seen, that this is possible on text/picture boxes with script labels.
The problem I have is, that I need something to identify different text strings inside of a text box.
Any idea?
Best regards,
TYPO

... using "Tags" was my first intention, as I would like to use them for formatting the content of my textboxes.
Unfortunately I haven't found anything about "custom" tags (in order to reference strings) in my InDesign Tagged Text manual.
Can you point me to some reference / manuals / literature?
Thanx in advance!

Similar Messages

  • Find a text frame on the page with script label

    hello to all
    I need to create a script to
    find a text frame on the page with script label "xxx"
    and read its contents into a variable.
    The content of the text frame is a number.
    thanks

    Hi Roberto,
    Welcome to the forum,
    This will find the labeled textFrame on the active page.
    var myLabel = "Foo", // change to label
          myPage = app.properties.activeWindow && app.activeWindow.activePage,
          myTextFrames = myPage.textFrames.everyItem().getElements().slice(0),
          l = myTextFrames.length,
          myVariable
    while (l--) {
        if (myTextFrames[l].label != myLabel) continue;
        myVariable = myTextFrames[l].contents;
        break; // presuming there's only one "Foo" labeled frame on the page
        // Otherwise you'll nead an array
    alert(myVariable)
    Trevor

  • How to enable the script label of a text frames in indesign using applescript

    hi all,
    am using Indesign CS2 with applescript..
    Using script I have to open a template in indesign and flow the word document into it...
    I can able to flow the word document into the template using "Place" command..but script labels of the text frames gets disabled...
    I need the script labels to be enabled...
    can anybody help me
    thanks in advance

    Script labels can't be disabled, so I'm not sure what your problem is -- perhaps seeing some code could help. Could it be that you're referencing a page item by label, but it is not responding because the item is part of a group?
    Shane Stanley <[email protected]>
    AppleScript Pro Sessions <http://scriptingmatters.com/aspro>

  • How to make a label as hyperlink in a continuous text

    Hi Experts,
    We are using SRM 7.0 extended classic scenario.We got a requirement where we need to send rejecton email to the requestor.
    In the mail content we need to make few labels as hyperlink.For that we need to write some ABAP code.
    For ex : Please click on the 'Universal work list' and accept the changes.
    In this continuous text we need to make the label 'Universal work list' as a hyperlink with some portal address say Dev portal address.(https://....)
    We have the portal address in the logic stored in some variable. Only thing is to imbed the link in the label.Actually I tried doing using concatenation  but didn't worked.Can someone help me with sample code to fix the issue.
    Thanks in advance.
    Regards,
    Kalyani

    Hi Experts,
    We are using SRM 7.0 extended classic scenario.We got a requirement where we need to send rejecton email to the requestor.
    In the mail content we need to make few labels as hyperlink.For that we need to write some ABAP code.
    For ex : Please click on the 'Universal work list' and accept the changes.
    In this continuous text we need to make the label 'Universal work list' as a hyperlink with some portal address say Dev portal address.(https://....)
    We have the portal address in the logic stored in some variable. Only thing is to imbed the link in the label.Actually I tried doing using concatenation  but didn't worked.Can someone help me with sample code to fix the issue.
    Thanks in advance.
    Regards,
    Kalyani

  • Find script label on object inside of another object.

    I have a graphic inside of a box the graphic has a script label. I would like to reference it and its parent but.
    var myAsset=myDocument.pageItems.item("Logo"); does not work. I am wondering if using allPageItems might work however, I have not made anything that has worked yet. Like var myAsset=myDocument.allPageItems.PageItem("Logo"); If there are any ideas about this I would appreciate the help.

    Hi Gonterman,
    Can you please try this JS Code.
    This code is select the page Items of "Logo"
    var myDoc = app.activeDocument;
    for (i=0; i<myDoc.spreads.length; i++){
         try{
              myDoc.spreads[i].pageItems.item("Logo").select();
              }catch(e){};
    This code is select the Graphics frome of "Logo"
    var myDoc = app.activeDocument;
    var myGrapic = myDoc.allGraphics;
    for (i=0; i<myGrapic.length; i++){
         var myArt = myGrapic[i];
         try{
              alert(myArt);
              if(myArt.label=="Logo"){
                   app.select(myArt);
              }catch(e){};
    thx
    csm_phil

  • Printing  page number and continu text in sap script

    Hi
      I have created sapscript to print PO and using standard print program with three pages.
    My thrid page called with NEWPAGE <> from Main window of first or sencond page wokign fine but the page number is coming like page 1 of 2, 2 of 2 and 3 of 2
    another issue: I want to print continue text if sapscript has more than one page, Not included last above newpage <page>
    Please give me some idea how to go about above two
    Regrads,
    challa

    Hello,
    TO print the page number do like this
    <b>&Pages& of &SAPSCIPTS-FORMPAGES&</b>
    To print continues pages. Put the text in the <b>MAIN</b> Page.
    and use <b>PROTECT ..... ENDPROTECT</b>
    If useful reward.
    Vasanth

  • [CS3 JS] Getting a page item by its script label

    I have a text frame on a master page with its script label set. In my script, I am trying to get a reference to the text frame with this:
    var doc = app.activeDocument;
    var spread = doc.masterSpreads[0];
    var tabFrame = spread.allPageItems.item("TabLeft");
    I get the error "spread.allPageItems.item is not a function"
    Any help will be appreciated. Thanks.
    Rick

    Hi Rick,
    spread.allPageItems returns a flattened array of all of the page items in the spread, at any level of the hierarchy (i.e., inside groups and other page items). Is that what you want? Sadly, allPageItems does not benefit from the special case where we use the label as a name, so you'll have to iterate if that's what you want.
    As Peter says (thanks, Peter!), spread.pageItems.item("label") gives you all of the page items whose label matches the string, but it does so in sort of a weird way--you'll always get a page item object. If no page items match, you get an invalid page item; if one matched, you get a single page item, and if multiple page items matched, you get a page item object that actually contains multiple page items. It can take a little testing to figure out exactly what it is that was returned.
    Thanks,
    Ole

  • Script Label insert into FileName

    Any help would be greatly appreciated!
    This is a portion of "PageExporterUtility5.0.js" that I'm tailoring to use at our workplace. Finding a simple description of how to use the "Script Label" is stumping me. How would you modify the following to work? My InDesign document has a Text Frame that I'd like to utilize the text contents in the filename. The text frame has been identified with a "Script Label" called "DOC_SIZE". An example of the text contents would be "18X24" (which is not the actual page size, just a rough description is needed).
    Current Base Name:
    816069-OHI-none-none.indd
    Export Name:
    816069_18X24_"Output Directory".eps
    w/ the Output Directory, I'd like to use the Folder Name, not the full path.
    These are the revalent sections of the script identifying the "outFile" Name.
    VAR SETUP
    for(currentDoc = 0; currentDoc < peuINFO.numDocsToExport; currentDoc++) {
        var tempENTRY = getNewTempENTRY();
        tempENTRY.theDoc = app.documents[currentDoc]
        tempENTRY.singlePage = (tempENTRY.theDoc.documentPreferences.pagesPerDocument==1)?true:false;
        tempENTRY.getOut = true;
        var baseName = (tempENTRY.theDoc.name.split(".ind"))[0];   
        var baseName = baseName.replace(/-OHI-none-none/g, "")
    MIDDLE
        else{
                currentINFO.outfileName = currentINFO.baseName;
                exportPage(currentINFO, PageRange.allPages);
    EXPORT PORTION
        case 2:
                app.epsExportPreferences.pageRange = pgRange;
                    currentINFO.theDoc.exportFile(ExportFormat.epsType, (new File(outFile + ".eps")), false);

    If the problem is getting the text contents of your labeled box, try something like this:
    var docsizeBoxes = new Array;
    for (var i = 0; i < app.activeWindow.activePage.textFrames.length; i++) {
        if (app.activeWindow.activePage.textFrames[i].label == "DOC_SIZE") {
            docsizeBoxes.push(app.activeWindow.activePage.textFrames[i]);
            break; }
    var docsizeString = app.activeWindow.activePage.textFrames[i].contents;
    You should now be able to use docsizeString in parsing out the name of the output file.  This assumes that there will be one and only one text frame labeled "DOC_SIZE" on the active page. So you might need some error checking.
    If it were me, though, I'd just get the actual pageWidth and pageHeight from documentPreferences and use them. In my place, we don't have too many doc sizes to choose from.

  • [AS] Script Label Items in a Group

    Hi all,
    I have a group of shapes that, when grouped together in Indesign, form an object.  This grouped object is script labeled "special".  I am trying to script label each of the individual parts of this grouped object "special" so that if users ever mistakenly ungroup the object, I can still manipulate all items with the "special" label...which is effectively my original grouped object.
    The catch is that I need to do this labeling with a script because I have thousands and thousands of files I'm working with.  I'd love it if something like this worked (but it doesn't):
    tell application "Adobe InDesign CS3"
    set theObject to page item "special" of document 1
    set theShapes to every page item of all page items of theObject
    set label of theShapes to "special"
    end tell
    The problem I keep running into is that it seems when an object is grouped, all the objects inside that group become, for all practical purposes, invisible.  The line "set theshapes to every page item of all page items of theObject" returns an empty list "{ }" as though there ARE no items making up the group.
    So then I thought I'd take a more tactile approach.  Select it, ungroup it, label it, group it back:
    tell application "Adobe InDesign CS3"
    set theObject to page item "special" of document 1
    select theObject
    ungroup selection
    set label of selection to "special"
    group selection
    end tell
    The problem with this approach is that after ungrouping the object with a script, there is no longer a selection as there is when doing the same by hand, so trying to set the label of a selection that does not exist produces an error.  Grrrrr.
    Friends, I know this can be done, but I need a little outside perspective on this to help me figure this one out.  As always, thanks in advance for your help!

    OK. Got it working but I'm not sure why. I went back to the bigger script of which the below is a part. And it works fine. I just don't understand why.
    tell application "Adobe InDesign CS4"
         activate
         set myDocument to active document
         set myPage to page pageNum of myDocument
         set active page of layout window 1 to myPage
         if not (exists library "Logowear_Lib.indl") then
              set theFile to open tagsLib
         end if
         set assetPlacer to item 1 of (place asset asset "3_12:13" of library "Logowear_Lib.indl" on myDocument)
         move assetPlacer to myPage
         move assetPlacer to myCoordinates
         set color_code_counter to 5
         set color_box_counter to 1
         tell myDocument
              repeat color_counter times
                   set theColorCode to item color_code_counter of Style_List
                   set oldLabelName to ("CW" & color_box_counter)
                   set newLabelName to my makeImageName(theSap, theColorCode)
                   set label of (object reference of every item of all page items of page pageNum of myDocument whose label = oldLabelName) to newLabelName
                   set color_code_counter to (color_code_counter + 2)
                   set color_box_counter to (color_box_counter + 1)
              end repeat
         end tell
    end tell

  • Using Read_text want to print continuous text

    Hi,
    My requirement is to print continuous text using read_text.
    Here we are not supposed to use include text to print continuosly.
    For ex:The text in script is like as below
    *Firstline
    Secondline
    Reqirement is to ptint as Firstline Secondline by using read_text only.
    Please help.
    Thanks & Regards,
    Shirisha Kandula

    Hi Hari,
    If the text is as below the concatenate will not work because for the newline also it will print in the sameline.
    Ex:
    Firstline
    Secondline
    *Thirdline
    O/P if we concatenate is: Firstline Secondline Thirdline
    But my requirement is to print like
    Firstline Secondline
    Thirdline
    Hope u got my point.
    Thanks,
    Shirisha

  • Pls correct my script for script label creation

    Hi,
    I want to add the script label name in Masterpages only which was in 'Text thread' options. Is this possible by script?
    This is my code
    var myTextFrame=app.selection[0];
    myTextFrame.label="textpage";
    var myNextFrame=myTextFrame.nextTextFrame;
    while(myNextFrame !=null)
        myNextFrame.label="textpage";
        myNextFrame=myNextFrame.nextTextFrame;
    Instead of first line I want to create this script label "textpage" for master page 'text thread' text frame only
    Instead of first line I want to create this script label "textpage" for master page 'text thread' text frame only. How to change my script pls help me?
    FYI:
    by
    hasvi

    @hasvi – I don't know if I understand you right. Do you want to label every text frame of a story with the same label value? As a starting point you want to work with a selected text frame of that story?
    If yes, select a text frame, could be any, and run that snippet:
    var textContainersOfStoryArray = app.selection[0].parentStory.textContainers;
    for(var n=0;n<textContainersOfStoryArray.length;n++){
        textContainersOfStoryArray[n].label = "textpage";
    Or do you mean you want to label the primaryTextFrame of the applied master spread, if you selected something on a "normal" page?
    That would be:
    //Object selected on "normal" page:
    var myPrimeryTextFrame = app.selection[0].parentPage.appliedMaster.primaryTextFrame;
    myPrimeryTextFrame.label = "textpage";
    Uwe

  • How to handle script label JS[CS5]

    Hi All,
    Is there any way to remove existing script label before assigning a new script label to a text frame.
    I have a pretty simple script which assign script label to selected frame, It has a small palette to choose label name but there is a negative scenario where user might assign a wrong label to a frame and if try to assign once again correct label it will not override the old key, value pair but assign a second one also to the same frame. In that case our next process will a get hurdle.
    So I am looking any workaround this but not able to find out the solution since InDesign DOM won’t give any mechanism to remove the script label. 
    Thanks
    Manmohan

    Hi Manmohan,
    Can you please try the below JS Code, I have to change my script label using this way.
    I hope you expect this.
    var myDocument = app.activeDocument;
    var myNewLabel = "Manmohan";
    var myPageNum = myDocument.allPageItems;
    for ( j = 0; j < myPageNum.length; j++) {
        if(myPageNum[j].label !=""){
        alert("Old Label\t"+myPageNum[j].label);
        myPageNum[j].label = myNewLabel;
    thx
    csm_phil

  • Table Script Label

    Hi,
    I'm new to indesign scripting and am using javascript / extendscript.   I paginate a document and get an array of all tables in the paginated document using
    var myTables = myDoc.stories.everyItem().tables.everyItem().getElements();
    I then walk through them in a for loop one by one conditionally applying a block of code.
    I need to make it a little smarter and apply different blocks of code depending on the script label.  I'd like to be able to:
    if(myTables[i].label=="1") {.... do this code ....}
    else if(myTables[i].label=="2") {... do this code ...}
    The problem is it appears I can assign a script label to the text frame the table sits in, but not the table itself.  If that's correct, is there an easy way for me to get the tables text frame's script label from the array element (myTables[i]) I'm currently sitting on in my loop?
    Please speak slowly or it's likely to fly right by me 
    Thanks,
    David

    Actually, you CAN assign a script label to a table, either through scripting or in the InDesign UI.  The UI  methods are arguably a bit obscure ... see for example http://www.peachpit.com/articles/article.aspx?p=415190&seqNum=13 for a description.

  • Script Label

    Hi All,
    For my requirement i want to get a list of all page items with "id" value  in script label.
    Script Label concept in entirely new for me.
    Below script get the ID value of every page items in the active document.
    But i dont know how to save all the values [alert(("ID:" + myPgItems) in the script label.
    Trying script:
    var myDoc = app.activeDocument
    var myPageItems = myDoc.allPageItems
    alert(myPageItems.length)
    for(i=0; i<myPageItems.length; i++)
        var myPgItems = myPageItems[i].id
        alert("ID: " + myPgItems)
    Please find the attachment for more information
    Kindly give solution as soon.
    Thanks in advance
    BEGINNER

    Hi Marc/All,
    I  want to get master spreads pageitems  as well.
    But the given script get pageitems from spreads not from Master Spreads.
    function createList(/*PageItem[]*/a)
        var i = a.length,
            r = {};
        while( i-- ){ r['_'+a[i].id]=null; }
        return r;
    function compareList(o1, o2)
        var k, a=[], z=0;
        for( k in o1 )
            if( o2.hasOwnProperty(k) ) continue;
            a[z++] = k.substr(1); // as k is in the form '_id'
        return a;
    function showReport(oldList, newList)
        var r = [],
            a;
        r[0] = (a=compareList(newList, oldList)).length ?
            ("NEW ids: " + a.join(" | ")) :
            ("No NEW item.");
        r[1] = (a=compareList(oldList, newList)).length ?
            ("REMOVED ids: " + a.join(" | ")) :
            ("No REMOVED item.");
        alert( r.join("\r") );
    // MAIN
    var doc = app.activeDocument,
        s = doc.label,
        oldList = s && (new Function('return '+s)()),
        newList = createList(doc.allPageItems);
    if( oldList ) showReport(oldList,newList);
    doc.label = newList.toSource();
    alert( "Data properly saved." );
    Please can anyone help me.
    Thanks in advance
    BEGINNER

  • Apply "Script Labels" to Object Styles?

    Hi again,
    I think I've kind of found a solution to my previous thread. But it involves using Script Labels in order to get it to work. Problem is I've tonnes of text boxes with Object Styles applied that don't have any Script Labels applied to them. Is there a way I can apply a script label to all of my existing text frames that have a particular Object Style already applied to them?
    Thanks in advance.

    You could use essentially the same script I just posted but set the label rather than the itemLayer of each found object. However, it seems like a convoluted approach.
    Dave

Maybe you are looking for

  • Photosmart 2575 not printing black? cartridge replaced, colour prints fine

    Photosmart 2575 suddenly stopped printing black, replaced cartridge... No problem with colour?

  • Mail crashing in mavericks

    I've upgraded to Mavericks and now my mail opens, freezes breifly then crashes... any ideas? Here's the report for those that understand.. Process:         Mail [253] Path:            /Applications/Mail.app/Contents/MacOS/Mail Identifier:      com.ap

  • Configuring a Block Step and catching an exception

    Hi, Can we catch an un-handled exception from an Synchronous step(proxy-send-receive), within a BPM? Can we send the error back to the Sender? How do we go about dealing it when , the process in EOIO mode. having queues...i think such exceptions will

  • Web Page throwing a 500 error

    I have a Coldfusion server (IIS7) with three websites on it. One of them is throwing a 500 error. If I put up a regular html page it loads fine, but .cfm pages do not. I'm not sure why. Can anyone help? Coldfusion 9.0 IIS 7 Server 2008 Thanks, Melind

  • After 10.6.7 supplemental update, the "More Info" button is grayed out

    I performed the Supplemental Updater for the late 2010 Mac Book Air, and now the "More Info: Button on the About This Mac window stays grayed out. That can't be correct, but I don't see how to fix it.