Select the text between 2 bookmarks with Javascript

I'm trying to select text between 2 bookmarks. Now, I have this:

var doc = app.activeDocument;

var BB = doc.bookmarks.firstItem ();
var be = bb.bookmarks.firstItem ();

bb.showBookmark ();
var en = app.selection [0];

be.showBookmark ();
var to = app.selection [0];

bb.showBookmark ();

App.Select (app.selection [0].parentStory.insertionPoints.itemByRange (fr.index, to.index));

This code does not work if bookmarks are on different pages.

Any suspicion that must go in the call to app.select ()?

What is the best way of art. to understand the DOM who uses app.select ()?

This code does not work if bookmarks are on different pages.

But it did, perfectly. I suspect that there is another problem.

What is the best way of art. to understand the DOM who uses app.select ()?

App.Select works as manually select the text. I think the underlying problem is that the text is not just "on pages", which is * not * a problem, but it's actually separate two stories. A script can only select contiguous text of the same story (a unique set of images of text block), just like you cannot select all the text in two unconnected blocks of text.

Tags: InDesign

Similar Questions

  • UI of Firefox is slow by typing or selecting the text (after update 33.0)

    After the 33.0 update, I noticed that typing a backspace in any area on a Web page or even in the Firefox address bar is slow to echo, on a lag of 1 second. Also, by selecting the text typed (to remove a TI, etc.) by a click-and - drag quick selects the entire, but when I click in the dialog box to deselect, the part which has not been posted as selected initially, is selected for a moment before the string whole hilite selection disappears.

    What makes the browser very cumbersome to use.

    This seems to be new to 33.0. I tried to reset Firefox, but it does not solve the problem. No problem in IE 11.0, so I do not think that the malware. I have also to keep all s/w and run avast/zonealarm for safety. I've never had an infection of malicious software on this machine. Win7 Home Premium 64-bit, 8 GB of RAM. The use of resources is low, so not out of process control.

    I have request the latest Microsoft "Patch Tuesday" updates 15/10, the same day that I updated to Firefox. This can complicate the diagnosis. But even once, IE was not affected, then, how the different Firefox UI for basic keyboard/screen I/O?

    If there is an easy way to "downgrade" to the 32.0.3 prior revision, I could try to confirm. Help, please!

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

    You can check for problems with the sessionstore.js and sessionstore.bak files in the profile folder of Firefox that store session data.

    Delete sessionstore.js will cause App Tabs and groups of tabs open and closed tabs (back) to get lost and you will have to re-create them (take note or bookmarks if possible).

  • in InDesign CS6 text appears white when I select the text... :(

    For some time in InDesign CS6 text appears white when I select the text. And remains white when I it deselect.

    It is necessary to another page, higher or lower, to have the text re-appear.

    Mac OS X El Capitan 10.11.6

    InDesign 8.1.0.419

    Make Explorer 5.5

    Adobe fonts

    If anyone has an idea...

    PS Yes:

    -J' cleaned out font caches

    -J' deleted Indesign preferences

    If you mean that the text seems to disappear, then it seems to be a relatively common problem with CS6 in El Capitan.

    I use CS6 with El Capitan and you encounter this problem sometimes. It happens constantly some days and other days not at all, but I've never established exactly what triggers it.

    As Bob says, CS6 is not supported, so it will not be a solution, but if this is the problem that you are experiencing then tap the display between 'Preview' and 'normal' pressing 'w' will fix it - temporarily.

  • Is it possible to center the text between any set of verticle lines displayed by the grid?

    I try to be attached to the specific tasks on this background that I use, I turned the grid text. I put the text at specific locations a lot. So it would be a lot easier and faster if I could just automatically center the text between the lines of the grid, rather that manually fiddling with it.

    well commented in this case might get you where you want to go.

    But if you either point frame type or text, it is quite easy to do.

    Turn on snap them to grid from the view menu

    Draw a rectangle to one of the lines of the grid to another (with no fill and no optionsl race)

    then place the text on the rectangle, turn off align it on the grid.

    in the attribute align select on align by object key select the text and the rectangle, click on (with selection) on the rectangle to make the object key (do not hold down the SHIFT key).

    Then in the Align Panel choose horizontal or vertical alignment icon.

    Vertically align the text means that a block of text has close text and even at that it is often subjective if you may need to reposition for a Visual
    accepted balance and sometimes it's true Center horizontal alignment according to the size and utilization of the text.

    Oh Yes after you Center the text you can delete the rectangle.

  • Select the text to all_views returns an empty string

    My application allows the user to choose between the data provider for ODBC and the data provider for Oracle. (ODP)

    When you use the ODBC statement:

    Select the text in all_views where view_name = 'MYVIEW '.

    Returns the string expected.

    If I connect via ODP however it returns an empty string.
    (If I use "Select *" it tells me that the text_length is 154 in this case-, so there are certainly available text.)

    I think it has something to do with the fact that the data type is long.
    In both cases I recover data with rdr. GetChars(), that should work.

    If I use the dbms_metadata.get_ddl instead of this function, it returns the string (probably because the return type is LONG)
    Unfortunately this function works only for views in the current schema, while the original works of Select for any view.
    (And I don't know what version of Oracle, this feature has been added-I need to support older versions too).

    Similarly, if I use one of the XML functions to retrieve the text in XML format it works fine.
    (Again it is probably returned as a VARCHAR2 instead of a LONG.)

    The strange thing is that when I created my own table containing a column LONG, I've been able to load and retrieve data without any problem.

    The problem seems to be specific to this column in all_views.

    Anyone know a solution to this?

    Thank you
    Mike

    Did you put InitialLONGFetchSize property appropriately on your OracleCommand object? See if this property does the trick for you?

  • How to select all text in a table with a single click cell?

    How to select all text in a table with a single click cell? I use TextField.selectAll () when you implement a table cell factory. But when I select a line with a single click, then a click on a table cell again: see the result image

    The text in the table cell is not all selected. What I simply selects all the text in a table cell when there is a click on it. How to realize that? Thank you

    Thanks for help ~.

  • Why I can't select the text in this pdf file

    Hello

    https://rapidshare.com/files/461732149/cannot_select.PDF

    I can't select text. When I try to select text, the cursor looks like a helping hand. It seems that there is a layer above the text. But when I use the Editor tool, I do not see any layer above the text. Is it possible to change the pdf file so that I can select some text?

    In fact, you should be able to select the text with the Touchup text tool if the annotation link is here or not. What is the tool you use?

    If you want to remove links, you can use the correction before the flight "to dispose of invalid links. At least the link in the sample document is not valid, because there is no action defined for it. You can also use the correction of 'Delete all annotations' to remove all the links that are present, even though you can edit or create a new correction to remove link annotations only.

  • If I created my iPad to the text can I communicate with someone who is not an apple product?  If yes where can I start the process?

    If I created my iPad to the text can I communicate with someone who is not an Apple product?  If so, where should I start this process. She is studying how to set up his tablet to the text for me. Is this possible?  Explicit detail please... I am new to this. Thank you.

    To be able to not text on an iPad Apple devices, you need an associated iPhone to the Apple ID, the iPad is using.

    Read the following support document SMS since it deals with sending SMS through continuity.

    Continuity allows you to connect your iPhone, iPad, iPod touch and Mac - Apple Support

    With continuity, all SMS and MMS text messages that you send and receive on your iPhone may also appear on your Mac, iPad, and iPod touch. You can also meet your contacts from any device is closer to you, including your iPad or Mac.

  • How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    I have only:
    D: / images (where are necessary + not need files)
    -a list with only the necessary files
    -a list with new names for the files needed
    Thank you.

    Hi Pustiu,

    Thanks for posting in the Microsoft Community.

    You want to know how to select the files in a folder using a list with the files you want and after that rename only the files using another list with desired new names.

    I would have you post your query in the TechNet forums because it caters to an audience of it professionals.

    Your query will be better addressed there.

    Check out the link-

    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads

    We know if you need help. We will be happy to help you. We, at tender Microsoft to excellence.

    Thank you.

  • CMD T to select the text tool

    Hello

    Cmd T on a Mac to select the text tool.  But once the seizure ended I can't press 'V' to get the selection tool.  It will simply type the letter V.

    Y at - it a shortcut out of the text tool.

    The solution I have is to make Cmd + B which selects the brush and then I can do my own letter for other tools.

    Is there another way that eliminates the extra step?

    Thank you

    of after effects using:

    "To end the text editing mode, press the keypad, select another tool or press Ctrl + Enter (Windows) or command + return (Mac OS)."

  • (AS) Select the text of the paragraph without bringing out the carriage return

    (AS) Select the text of the paragraph without bringing out the carriage return character.

    I need help to select a paragraph in a story.
    The selection does not contain a 'return' (ASCII number 13 ")

    My current sample is as follows:
    -example assumes that the insertion point is already placed in a specific paragraph.

    Tell application "Adobe InDesign CS3"
    activate
    theDoc Set to the active document
    say theDoc
    Select the paragraph 1 of the selection
    end tell--theDoc
    end tell--app

    Sounds simple... The example above to select my paragraph selected.

    but he also chose the carriage return also. How would I go to do this?

    Any advice would be helpful!

    Thank you!

    Try:

    Select text in character-2 of paragraph 1 of the selection of character 1

  • Photoshop 2015: BUG? Layers panel auto-fait scroll to top when you select the text element with the text, creation/copy of layer tool and other actions

    This is a bug or a really bad and frustrating idea for a story.

    (1) in the layers panel, select a text layer, it highlights

    2) change to the text tool

    3) click on the text element in the workspace

    OR

    (1) select a layer in the layers panel

    (2) Ctrl-J, new layer by copying

    EXPECTED: Panel layers rest in the same position

    REAL: Panel layers scrolls the element selected or new layer to the top of the Panel. BORING.

    I do not need or want Photoshop to make decisions for me, space to work around to move without asking, or generally to spoil my flow!

    Please fix this or give me an option to turn it off as soon as POSSIBLE.

    autoscroll-problem.png

    You have successfully updated to 2015.0.1?

    The bug known as in the original message has been fixed in this version.

  • Best approach advanced actions, mulitple selections of text on a slide with other information...

    Hello

    I have to do a slide that has multiple selections of text on a slide, but using advanced actions to change each Cap. text... for example...

    A cursor with the image for the user to click, when you click on a text caption appears, and in this caption text is a chip-shaped button that says 'Next' when that is clicked then another text Cap comes up with another button which also then said, then when that is clicked on and the cap of the final text is reached says the button then close. User can click on that and returns to the slide of the same hand.

    Was then I intended to do this was advanced use actions is the right approach? (or shared)...

    In addition, if the fact this way, it will affect scorm...?

    Kind regards

    Sabine

    I don't see the connection between your question and SCORM? These buttons are rated?

    If they are a few buttons to display the new text, which is not a score for each button, I would not use that many 'Next' buttons but keep the same button and uses a counter. The content of the text caption could be a variable for which you are editing content after each click. Counter should be used to check if the close button must appear and the next button hidden. This article is such an approach to click for images: Blog after Posterous? - ClickClick - Captivate blog

    And like to have a variable instead of static text, for which you can change the value: 'Beat the system' - save time by creating advanced Actions (Captivate) - Captivate blog

    No response yet on shared or advanced actions, it depends on which version you use, answers on the score and more questions.

  • When I click on the URL bar or the search bar, it is not select the text or show the cursor as before.

    AS says the question, when I clicked on the search bar in previous versions, 'Google' would disappear and I would see the blinking cursor. When I click on the URL to a blank tab, he would choose the text, and I'd see a slider when I typed or backspaced to delete the selected text. Now, none of this happens.

    After a bit of troubleshooting, it seems that any theme I use is causing this problem.

    In the previous version of Firefox, I used the exact same plugins modules and the theme and never had this problem.

    I went thru and I tried to disable all the modules and plugins, and if I run in safe mode, I have the same result. None of the modules or plugins causes this. It seems to be a theme that I use that causes this.

    As I said in my original question, it happened with any theme, I used. Some changed the color, some are not.

    This can be locked, unless someone else has the same problem and wants to continue to use Firefox 15 or more.

    I went back to an earlier version. Unless they add the ability to change this absurd, useless, counterintuitive behavior, I don't "upgrade" any time soon.

  • Change the color of the text in several .psd with actions

    Is there a way to change the color of the text layers in several files in .psd (with a different text in each of them) with actions?

    All the files that I have to do that with are structured in the same way - background and above a layer of text.

    Here are the basics...

    #target photoshop;
    main();
    function main(){
    //select folder where PSDs are held
    var selectFolder = Folder.selectDialog( "Please select folder of PSDs");
    //if no folder selected quit.
    if(selectFolder == null) return;
    //get an array of all PSDs in the folder
    var fileList = selectFolder.getFiles("*.psd");
    //iterate through file list
    for(var a in fileList){
    var textColour = new SolidColor();
    textColour.rgb.hexValue = "00ff00"; //set colour to green
    open(fileList[a]);
    activeDocument.activeLayer = activeDocument.artLayers[0];  //Select top layer
    if(activeDocument.activeLayer.kind == LayerKind.TEXT){ //check if it is a text layer
    activeDocument.activeLayer.textItem.color = textColour; //set text to colour
    activeDocument.save(); //Save changes
    activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document
    }else{//not a text layer so close document
     activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document
     }
    }//end of filelist
    };
    

Maybe you are looking for