Sellect OCD with script

I tried not to a put a question to every step of the way, but I'm not good at that.

Now, I'm trying to select the table of contents with script so I can use other scripts (idea being able to make a series of 3 different points with 1 click). I think I'm looking something like this:

App.Select (app.activeDocument.pageItems.item ("preface"));

From what I've read, who has ceased to be good in CS5 and now I need to loop through all to find something that I name the area of lable of script. I can't find examples of a good current example of this. Any help would make me smile.

Here's what I got so far:

/ * REFRESH WITH NEW CHAPTER TOC * /.

/ * app.select (app.activeDocument.pageItems.item ("preface"));  */
app.scriptMenuActions.itemByID (71442) .invoke (); To update the table of contents

/ * UPDATE A TABLE OF CONTENTS AFTER REFRESH STYLE * /.
app.findChangeGrepOptions.includeLockedLayersForFind = true;
app.findChangeGrepOptions.includeLockedStoriesForFind = true;
app.findChangeGrepOptions.includeHiddenLayers = true;
app.findChangeGrepOptions.includeMasterPages = true;
app.findChangeGrepOptions.includeFootnotes = true;

app.findGrepPreferences = app.changeGrepPreferences = null;

app.findGrepPreferences.findWhat = "\\^n\\^yPage";
app.changeGrepPreferences.changeTo = "\\n~yPage";
app.activeDocument.changeGrep ();

Thanks again.

Do you mean that you have added a title of script somewhere?

Well, you cannot add a script label to a story. You probably added so)

That's what you were doing) to the first textFrame containing your table of contents. And

(it is true that it is a bit confusing, but probably you'll get the hang of)

with persistence a little, as we have many moons ago) even if the

Table of contents takes up only textFrame, a textFrame is not the same object that

the story.  The textFrame is what the story is in. To read the article

object to which belongs the textFrame, you have

monarticle = myTextFrame.parentStory;

So, assuming that you did baptize 3 blocks of text in your document with a script

label, I don't think that there is a way by which you can access directly

scriptLabel without loop through all frames of text in the document.

However, if you happened to their name in the layers panel, instead, and

If you called them Bob, you could then do this:

myDoc.textFrames.itemByName("Bob")

Once you have your frame, you have your history, as explained above.

Tags: InDesign

Similar Questions

  • working with scripts

    Hello

    I work with scripts of these days, I wonder if anyone can guide me through a document that explains each step and gives an example of this work.

    I already read the explicit book of the IPCC, but it gives no examples of its use.

    Thanks for your help

    IPCC express 4.0

    I also wonder if, using the scipt even editor would work for CUE.

    Nice day

    Hello

    Take a look at this link.

    It's a zip file with examples of "aef" from Cisco:

    http://www.Cisco.com/application/x-zip-compressed/en/us/guest/products/ps1846/C1028/cdccont_0900aecd80179234.zip

    Hope this helps,

    Juan Luis

  • Symbol of movement with script

    Hello

    How can I animate a symbol with script on mouse over.

    I tried...


    sym. $("zone") .animate ({top: '-8px'}, 250);

    ... but it does not work.

    Thanks in advance.

    Sorry for my late reply. You must load the jquery library by using the upload Panel script. Jquery loading your code will work.

  • How to get all the style of paragraphs and their policies of an indesign file and write all the info with info para in a txt file with scripts

    @

    How to get everyone how to get all the style of paragraphs and their policies of an indesign file and write all the info with info para in a txt file with scriptingstyle and their policies of an indesign file and write all the info with info para in a txt file with scripts

    Hello

    Try this,

    var doc = app.activeDocument,
        pstyles = doc.allParagraphStyles,
        report = "";
    for(var i =0;i
    

    Kind regards

    Cognet

  • How to remove master page with script elements

    I want to remove items from the master page with script

    app.activeDocument. masterPageItems.remove ();

    and there are items on the master page to remove all the and I want to create a new one (rectangle frame or text)

    Try this,

    var myDoc = app.activeDocument;  
    
    for(var i=0; i< myDoc.masterSpreads.length; i++)
    {
        for(var j=myDoc.masterSpreads[i].pageItems.length-1; j>=0 ; j--)
        {
            myDoc.masterSpreads[i].pageItems[j].remove()
        }
    }
    

    Vandy

  • Clone Stamp does not not with Scripts

    Hello

    My sister wants to make a stop motion and she would like to remove a stone on each image.

    I tried to make a script, but when I apply it it doesn't change anything, so I wanted to know if it is possible to use the buffer of duplication with scripts, and if so, how?

    Thank you very much in advance for your help!

    And sorry if my English is not very good, I'm french!

    Are actually using scripts or actions?  I tried the clone with actions stamp, and I got the same result.  You can use the spot Healing Brush to remove the rock.  who works with action, as long as you have "The recording tool" lit - not sure what the menu in French item name.  The other option to record an action that does this: make a selection of an area you want placed on the rock, duplicate this selection to a new layer (cmd/ctrl-J), hover over the image of the rock cutting, and then merge to the bottom of the layer.

  • [JS CS3] Apply the italic with scripts

    There is a keyboard shortcut called 'Apply Italics', which is by default [cmd] + [shift] + [i] on Mac and [ctrl] + [shift] + [i] Windows. I use it often because it will change the correct italic text. E.g. text with the style '85 Heavy' will change '86 Heavy Italic' or 'Display Semibold"to"Display Semibold italic ".

    Is it possible to access the "apply Italics" with scripts? The action is not available in any menu, AFAIK.

    Yes it is possible.

    Normal:

    app.menuActions.itemByID (119609) .invoke)

    "BOLD":

    app.menuActions.itemByID (119610) .invoke)

    Italic:

    app.menuActions.itemByID (119611) .invoke)

    Highlights:

    app.menuActions.itemByID (119612) .invoke)

    With the exception of normal, these are all the toggles...

    Substances

  • Problem with script on the master page

    So I have my build script of the unique number bit that I have posted here before... it's on the Initialize event of the field.


    If (this.rawValue == null) {}
    var d = new Date();
    this.rawValue = parseInt(d / 1000);
    }
    else {}
    this.rawValue = rawValue;
    }

    Which works very well if on the body of the form, but if I put it on the master page it re - initializes (and changes the number) whenever a subform gets shown/hidden. No idea how to stop it from doing this? I tried it on a few other events without a bit of luck.

    I came across another problem with this script, a field called 'Date' was interfering with the script - throw an error "the Date is not a constructor. Is - this normal (function/field collision)?

    Hi Jono,

    I had problems with script within the Master pages before. What I've done in the past, it is a textfield hidden in the main pages of script with overall binding (which featured many here today); then same name textfield in the master page picks it up.

    Good luck

    N.

    Post edited by: Niall O'Donovan

  • I'm built with script problems. I Yes Script and it doesn't help. Is there another suggestion... 20 for a website it madness.

    In addition to what I said. I even uninstalled and install a fresh Firefox. Always be flooded to the script. I spend more time trying to put an end to those that I can on a Web site.

    I left Chrome after 3 years because of the questions on the page does not have in the hope that by returning to Firefox, everything would be good.

    My cache is empty and I've done everything suggested that Firefox and still unable to go to a Web site with this question.

    Have you added any of these sites to the block list in YesScrpt?

    This extension is not a bitch at all until the user configures the blocking for each Web site where they get this message.

    I think that your problem is with a script that take too long to run, and that Firefox is you say that. You can try changing that 'time' a script is allowed to run before the message is triggered with this preference.

    http://KB.mozillazine.org/DOM.max_script_run_time

    Try 15 or 20 and see how it works.

  • Customize the Dock with Script

    I'm doing an AppleScript script that puts a .app in my dock users based on the org group that they are part of Active Directory.  For example, a teacher will get a different app in the dock as a student, because they are part of another group in Active Directory.  Can someone help me with this?  Thank you!

    I do not use Active Directory, so I can't test your org group decision tree in AppleScript. But here's how you specify that a launch of the application, minimize itself to an icon in the Dock and continues in the Dock after he left running. Use GUI scripts. Tested with OS X 10.11.4.

    The following code is an adaptation of MacScripter.

    -AppleScript that launches, limit itself and remains on the dock, once it is stopped.

    game appName to 'Notes '.

    say application (my appName) to launch

    say application 'System events' to tell UI element appName of list 1 of process 'Dock '.

    perform action 'AXShowMenu '.

    click on menu item 'Options' from the menu 1

    click on menu item "Keep in Dock" from menu 1 menu item 'Options' from the menu 1

    perform action 'AXShowMenu '.

    click on menu item 'Hide' from the menu 1

    perform action 'AXShowMenu '.

    click on menu item 'Quit' from the menu 1

    end say

  • launchctl problems with script

    MacBook pro running El Capitan.

    I'm new to all this and have used crontab successfully, but am trying to future proof the system using launchd.

    I'm trying to get a cron process works according to the recent instead of crontab launchd process to collect my tvguide from one day to the next.

    I have this script executable:

    osascript-e ' tell app "system events" to display the dialog box "Starting tvguide.sh.

    tv_grab_uk_atlas - days 7 - output /Volumes/Media/VBoxRecordings/tvguide.xml

    osascript-e ' tell app "system events" to display the dialog box "end tvguide.sh"

    Who runs correctly when called through the terminal:

    /Volumes/media/VBoxRecordings/TVGuide.sh

    or avec./tvguide.sh

    When in the right directory.

    The script gives a pop window to show that it is working.  I have to click the OK button and then he collects guides (30 minutes) and records them in the .xml file and then gives a pop up window when it's finished to tell me it's done.  Yet once I click OK to close and put an end to the sequence.

    I wrote a list of properties file and inserted in ~/Library/LaunchAgents as follows:

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

    <! DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0 / / IN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" > ""

    < plist version = "1.0" >

    < dict >

    < key > tag < / key >

    < string > com.gjj.tvguide < / string >

    < key > ProgramArguments < / key >

    < table >

    < string > /Volumes/Media/VBoxRecordings/tvguide.sh < / string >

    < / array >

    < key > StartCalendarInterval < / key >

    < dict >

    < key > time < / key >

    < integer > 3 < / integer >

    < key > Minute < / key >

    < number > 0 Integer < / integer >

    < / dict >

    < / dict >

    < / plist >

    Who should call tvguide.sh every night at 3:00 and follow the same process.  Here is where the trouble begins.

    I check that the process is not loaded with


    The launchctl list $ | grep gjj

    and unresponsive.  Fine.

    I load it with


    ~/Library/LaunchAgents/com.GJJ.TVGuide.plist load launchctl


    and then run


    The launchctl list $ | grep gjj

    and get the response


    -0 com.gjj.tvguide

    Once again very well.  No PID, no error and the found file is loaded and ready to run.

    I have replace the StartCalendarInterval command and forced to invoke the process with

    $ launchctl start com.gjj.tvguide

    and nothing happens.  I run


    The launchctl list $ | grep gjj

    and now I get

    -com.gjj.tvguide 1

    So no PID, it is not executed, but there is now an error 1 (without explanation).

    I unload, reload and try again.  The same result.

    I return to the terminal and run the script as before and it works.

    If I reduce the script in the first line only force them to start the process it works and I get the dialog box and click OK button.

    Why the script does not work when I ask him to run the collection guide via the plist file?

    There are balls that I can see to see what is happening?

    Any help welcome!

    Geoff

    AppleScripts must run in the field "bootstrap" GUI. Try to add the "LimitLoadToSessionType" string value key to the plist with the value 'Aqua '.

  • Problem with script OnConnect Portal WEBVPN AnyConnect

    I have a minor problem

    customer is 2.5.0217

    OnConnect script works great by the client anyconnect however if I use the web front-end ssl to launch the client anyconnect onconnect script does not run. Is it possible to have onconnect and ondisconnect scripts to run if the anyconnect client is launched as part of the webvpn.

    I searched high and low, but without success. Help or ideas would be greatly appreciated.

    Thank you

    Hello

    According to my understanding of the issue, I see that the script does not run when Anyconnect is launched using the portal.

    It may be related to a difficulty finding profiles sometimes.

    This is usually the result of not having a hostname and hostaddress configured in the existing profile. I think it is perhaps a good idea to add

    these values to your existing profile so we land on the right xml profile the first time.

    Try to add the host entry as  with fqdn of ASA.

    And let me know if it helps.

    For clearing up the credentials in the dialog box when using AnyConnect I found one of the bug:-

    CSCsx76993

    Symptom:

    User credentials are cached in the preferences.xml file when you use the Anyconnect client.  So when they revive Anyconnect, the user name is displayed in the client.

    Conditions:

    You can see all the client anyconnect.  It is a configurable option in the IPSec client.

    Workaround solution:

    Currently there is no work around

    And I can see it resolved in 2.4.202 however, I'm not sure if its fixed in 2.5 also. For this I would like to hear from others.

    Kind regards

    Shilpa

  • Help with script overset text?

    Hi, I found this script I think it is by Laubender. Which I use for a while now and I love it. It is easier to see where the blocks of text with overset text.  My Question is.  How would change this to get rid of the fill color of Magenta (perhaps with the original color of text box before the Script ran?) after the overset text is corrected

      app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;   
      app.doScript  
        (  
        detectOverflowingTextFrames,  
        ScriptLanguage.JAVASCRIPT,  
        [],  
        UndoModes.ENTIRE_SCRIPT,  
        "Detect Overflowing TextFrames | SCRIPT"   
        );  
        
      function detectOverflowingTextFrames() {    
      var storyArray = app.documents[0].stories.everyItem().getElements();  
      var storyArrayLength = storyArray.length;  
    
     // A loop through all the stories of the document:  
      for(var n=0;n<storyArray.length;n++)  
      {  
        // The condition should be clear.  
        // However, there is one rare case where overflows is false,  
        // but the text frame is showing a red + sign:  
        // If a footnote text overflows in the last frame of a threaded story.  
         
        if(storyArray[n].overflows)  
        {  
          // TextContainers could be textFrames and textPaths !!  
          var textContainersArray = storyArray[n].textContainers;  
          var lastTextContainer = textContainersArray[textContainersArray.length-1];  
           
          // A function call to the last text frame, if its story overflows:  
          doSomethingWithTextContainers(lastTextContainer);  
         };  
        
      }  
        
      function doSomethingWithTextContainers(/*textFrame or textPath*/textContainer)  
      {  
        if(textContainer.constructor.name == "TextFrame") // Could be text on path as well  
        {  
          // Here your code that is changing the size of your frame  
          // In my example code here it will only fill the frame with color Magenta:  
          textContainer.fillColor = "Magenta";  
          // If you want to move the text frame, consider to unlock it first, if it is locked.  
        }  
        if(textContainer.constructor.name == "TextPath")  
        {  
          // Here your code, if text on a path should overflow.  
          // Depending on the pageItem that holds the path, the parent should be the pageItem you are interested in.  
          // Usually a graphicLine or a polygon. Could also be an oval, a rectangle or even a textFrame.  
           textContainer.parent.fillColor = "Magenta";  
           textContainer.parent.strokeColor = "Magenta";  
        }  
       
      }  
        
    };  
    

    Thank you

    Alain bombaert

    As long as you do not create a new text container to correct excessive; the following script should work for you.

    //Scripted by ?Laubender?
    //modified by Skemicle
    if (parseFloat(app.version) < 6)
    main();
    else
    app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Splice Image Along Path");
    function main() {
        var doc = app.activeDocument;
        var stories = doc.stories;
        for(s=0;s		   
  • Need help with script java folder level for silent registration with unique file name

    That's what I'm trying to do

    1. when a person completes the request on one of our computers in the office, there will be a button send at the bottom of the application.

    2 submit the application on is automatically stored on the local server with the file name determined by the fields name and surname on the application.

    example - John Doe Application.pdf

    Saved in the folder C:\Users\Station1\Desktop\FinishedApplication.jpgApplications

    3. This is the example of code I found, but I don't know how to enter which fields determine save name and where to save it to.

    http://thelivecycle.blogspot.de/2015/06/save-with-new-name-in-specified.html

    http://thelivecycle.blogspot.de/2015/06/save-with-new-name-in-specified.html http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.html

    Thank you!

    Lol this is the part that you need as a script to the folder level:

    var lcbSaveAs = app.trustedFunction (function (vDoc, vPath) {}

    app.beginPriv ();

    vDoc.saveAs ({cPath: vPath});

    app.endPriv ();

    });

    This is the code you use in your file:

    lcbSaveAs (, "/ C/users/specialisee1/Desktop/result /" + this.getField("FirstName").valueAsString + "" + this.getField("LastName").valueAsString + "Application.pdf");

    lcbSaveAs is the name of the function of trust.

    vDoc.saveAs is the Document object, call the saveAs method.

    I don't know what oDoc.SaveAs is, or where you got it.

  • Prevent the dialog box fill with scripts

    Hello.

    I have an automation script that fills some pixels on a layer. Everything works, but sometimes it displays the dialog box to fill for the parameters with some png files (not all). I need to get rid of the dialog box. Is it possible to do this with the script? for example a default option?

    Thank you!

    Photoshop 2015.5 CC

    Windows 8.1

    Well, look's like I solved it the problem.

    The dialog box showed on the png files, Image-> Mode-> indexed color.

    So I added prior to filling, the following script, which will ensure the RGB Image Mode:

    var idCnvM = charIDToTypeID( "CnvM" );
    var desc36 = new ActionDescriptor();
    var idT = charIDToTypeID( "T  " );
    var idRGBM = charIDToTypeID( "RGBM" );
    desc36.putClass( idT, idRGBM );
    executeAction( idCnvM, desc36, DialogModes.NO );

Maybe you are looking for

  • Disabling Javascript for individual Web sites

    I've finally isolated the source of unblockable ads that appear on some Web sites, but not others. These ads come from different sources, but many of them are Chitka ads that block a portion of the screen and can not yet be clicked OFF. They block ju

  • I can't install the driver of Unknow devices.

    Hello! My laptop computer intsalled Windows 7, I have install the driver, but he is a pilot, I can not install, which is Unknow driver. I find the complete driver on the hp homepage, but I can't find the driver of Unknow devices. My laptop is HP Pavi

  • Change the ISAKMP keys

    I have a Pix 506 running v6.1 (2) that I need to change the ISAKMP key on. When I entered the new type-error telling me that there is already a key, but I can't find how to clear the existing key. Any suggestion is appreciated. -Pete

  • No file write permission?

    I try to save my my application settings in a text file to be read next time, the application is open. I get permission errors when trying to load the application due to this code. It would be the right way to save your settings in a text file or the

  • Smartphones blackBerry at startup error message

    I have a Bold 9000. I tried to download the ZDNET app and when I tried to run, he said that there was not enough memory, which was not the case (a 15 meg available). Thus, several times I tried to uninstall and reinstall the software. Now, when I boo