How to display text with findText()

Dear Sir

I use findText() to search for a string in an existing document.

I work when I use the method of the length of it that is me the number fo point fiound.

I want to go to the page where it was selected and find the search text.


Thanks for your help!

Hello

I always do this way.

Select each result and the zoom, you will jump to the page.

var doc = app.documents[0];
app.findTextPreferences = null;

//current zoom percentage
var zoom_bk = app.activeWindow.zoomPercentage;

//keyword
app.findTextPreferences.findWhat = "anytext";

//found collection
var result = app.findText();

for (var i=0; i < result.length; i++) {
     result[i].select();
     app.activeWindow.zoomPercentage = 400;
     //jump to each "anytext"
     alert(app.findTextPreferences.findWhat + " was found " + (i+1) + "/" + result.length);
};
app.activeWindow.zoomPercentage = zoom_bk;

mg

Tags: InDesign

Similar Questions

  • Does anyone know how to display along with the app on the Mac App Store in the Sierra of MacOS?

    Does anyone know how to display along with the app on the Mac App Store in the Sierra of MacOS?

    I've just updated to Sierra. Since the upgrade did several reboots. When I discover an app the side also shows "4 +" or similar and I click on the note to view reviews and ratings of customer, a blank screen appears. Everyone knows this or have a way to solve this problem?

    I see even here in Seattle, so I think the question is about the end of Apple.

    By the end of 2012 Mac minis, macOS?  Watch 38 mm silver AL, watchOS 3; iPad 2 Air & iPhone 6 + iOS 10.0.1;  Apple Airport Express

  • How to display prices with which we won the most?

    Hello guys!

    I try to learn a few new skills in oracle sql if I was looking for examples on the web. I found this one, with 6 questions. I did all the tables and all the connections. I knew solve 5 questions but that, finally one seems too difficult for me.

    I don't know how to display tables with which we won the most. We do need to check what Denis is rendered which course and anyone who paid that invoice, what kind of prices was also on this Bill (normal od student).

    I would be really happy if you guys could help me.

    Thank you very much!

    Here is the printscreen of my E-R model and my oracle sql code:

    http://imgur.com/oM5IbTL,
    http://pastebin.com/c1CqF3K8

    If you don't understand anything, despite my bad English or anythning else, feel free to ask. I would be really happy if we could solve this problem!

    As far as I know, bill and section have no impact on this problem.  As Frank said, this looks like a Top - N type problem.  You is a way to get answer:

    dev1 > select gains, num_students, lesson_name, course_name

    2 from (select course_name, lesson_name, num_students, gains,

    3 dense_rank() ON rn (salary desc order)

    4 of (select c.name course_name, l.lesson_name,)

    5 count (vr.id) num_students,

    6 sum recipes (p.price)

    7 of course c

    8 Join Conference l

    9 l.fk_course = c.id

    Join the 10 visit vg

    11 on l.id = vg.fk_lecture

    join 12 visitor RV

    13 on vg.fk_visitor = vr.id

    price of 14 p join

    15 p.fk_course = c.id

    Group 16 by c.name, l.lesson_name))

    where the 17 rn = 1;

    LESSON_NAME NUM_STUDENTS PROFIT COURSE_NAME

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

    C++, programming 3 750 programming

    Java programming programming 3 750

    If you really don't want that one line returned with a tie, then you replace dense_rank, row_number or do something like:

    Select course_name, lesson_name, num_students, recipes

    from (select c.name course_name, l.lesson_name,)

    Count (VR.ID) num_students,

    Sum revenue (p.Price)

    of course c

    join the l Conference

    on l.fk_course = c.id

    Join visit vg

    on vg.fk_lecture = l.id

    Join the vr visitor

    On vg.fk_visitor = vr.id

    Join the price p

    on p.fk_course = c.id

    C.name group, l.lesson_name

    order by 4 desc)

    where rownum = 1;

    This structure returns a single line in the case of links, but there is no way to predict which of the related rows will be returned.

    John

  • Display text with icons

    JDev Version: 11.1.16

    I would like to display text with icons, when the text wrapping it looks like below

    for example. blah blah blah blah blah blah blah blah blah blah blah blah blah

    blah blah blah blah blah blah blah blah blah blah blah blah blah

    blah blah blah blah blah blah blah blah blah blah

    I tried with ADF CommandImageLink and goImageLink but these display the first icon next text.

    I also tried outputText and image, but the creation of two columns.

    Thank you

    Kala

    I tried with ADF CommandImageLink and goImageLink but these display the first icon next text.


    The default value is the first, but the position of the icon can be defined as an accompaniment with iconPosition.


    Icon="/images/search.gif".

    actionListener = "#{some.el.expression}" iconPosition = "creeping" / > "

  • How to display records with zero on dashboard

    Hi expert,

    If I have a product dimension table,
    a fact table


    If there are records containing values in the comic book, A product void.

    If the logical column of the fact is SUM (...).

    How to display records with values null in the dashboard.

    Use the outer join?

    or another method?

    I don't want to use outer join because it makes the PRD be so complicated

    Jin
    Pull all of the columns in the criteria, it will show NULL for a product

    For zero, on the done column use IFNULL(fact_col,0)

    that looks like this

    http://a.imageshack.us/img180/6616/Ifnull.jpg

    Thank you
    saichand.v

  • How to display text in &lt; em &gt; &lt; dfn &gt; and other tags in shared only in mode mode direct dreamweaver cs6

    How can I get Dreamweaver CS6 to display text in < em > < dfn > and some other tags in screen mode so I can see and edit on screen design?

    It appears if the direct mode. However, it cannot be changed on live display, only on the screen of the Code.

    Thank you...

    I guess there is something wrong in your code it is confusing DW.

    Make sure you work with valid code / clean by running the page through the validator at http://validator.w3.org/nu

  • How to display text in main.swf to external.swf

    Hello

    I don't know how to access the fields of text, video clips and so on of external SWF.

    in my main.swf is input field text called nickname_txt and password_txt if nickname_txt and password_txt are correct loads, flash external swf called userinterface.swf.

    in userinterface.swf the text field is called username_txt

    and I need to display text of main.swf nickname_txt userinterface.swf username_txt

    Thank you very much in advance

    SWF to swf communication

    http://kb2.Adobe.com/community/publishing/918/cpsid_91887.html

  • How to display text programmatically in the drop-down list box?

    Is it possible to display text programmatically in a drop-down list box.  I would like to display the word "Select" in the drop-down list box each time my program starts.  As it is now, drop-down list displays the last channel that has been selected the last time that the program is running.

    Thanks in advance.

    In fact, after actually reading your post...

  • How to display '-1' with a table not formatted (Excel spreadsheet) in InDesign

    Hello!

    If you place a table not formatted (Excel spreadsheet) in the cells of InDesign with '-1' are not displayed :-(

    The Adobe solution is to use the tables formatted, but that is no option for us, because if the numbers in the excel worksheet updated, InDesign loses real formatting and rebuilt the Excel formatting :/

    The problem is understandable for Adobe, but we didn't have the suspicion to ask in the forum for a solution.

    I think the problem is the operating system and independent version of InDesign - we everywhere (Windows 7,8,10) and Mac OS X, CS6 CC problem - there is a bug/feature in constand.

    Does anyone have a solution or a solution to our problem? :-)

    Thank you in advance!

    Ludwig

    In Excel, you must precede the - 1 with an apostrophe (so '-1). As you probably know, this is unnecessary with other negative numbers... If I remember correctly.

    It is not sufficient for formatting just these cells as text in Excel, the apostrophe is necessary.

    Mike

  • How to display text copied in the right order?

    I have a PDF document with text created from a Photoshop file.

    There are several layers of text in this Photoshop document.

    Problem:

    When I do 'select all of the text' in Acrobat and then "copy" and then paste them into a text editor text is pasted into the mess.

    It's a bit predictable because of the several layers of text in the original Photoshop file.

    Question:

    How can I find out the desired order of the text layers Photoshop when you create the PDF file?

    The layers are stacked in the correct order in the Panel layer in Photoshop. I was hoping that's the issue, but it is not. Is there another way in which I can specify the order of text?

    Your help will be very appreciated!

    It seems to work in reverse somewhat as a first In, First Out model. The best thing to do at this point is to open the navigation of content in Acrobat format Panel, locate objects and move them in the right order.

  • How to create text with a bar full of color boxes at the top of page 1/3?

    I am in the design of learning and using CS4

    I want to create a form with boxes like those below.

    Picture 5.png

    I understand how to set a block of text on top with white text, but how can I box behind that bar (incl. rounded corners) color

    Once I have the design that I was intending to use the Adobe PDF software to use their tool to have a PDF form.

    So I would ask as I go about it in the right way?

    I appreciate any help - thanks a lot. John

    It is a multi-step process and can be done in a number of ways. Here's one way:

    Create a rectangle and rounded a corner. Then, create a column once, two-row table. Fill the upper cell with the blue wire. Make sure that it is a little wider than the original rounded rectangle. Cut the table to the Clipboard and then select the rounded rectangle frame and choose paste into.

    That should hopefully help you get started.

    Bob

  • New on this... How to move text with the contents of overflow to the new page?

    When the content in a text box is too big and must go beyond the next page, how can I do this? I can't so...

    Click on the small red + sign below to the right. Then click on the next page.

    If you hold the SHIFT key when you place the text it will sink to fill all the pages.

  • How to find text with a specific point size objects

    Can I somehow fine-tune the selection point size xx and smaller? I would like to explain these objects later.

    var alltxtObjsBelow10 =  app.activeDocument.stories.everyItem() //...with point size smaller than 10pts
    alltxtObjsBelow10.createOutlines();
    

    Try this.

    var doc = app.activeDocument;

    var texts = doc.stories.everyItem ().textStyleRanges.everyItem () .getElements ();

    for (var i = 0; i)<>

    {

    If (texts [i] .pointSize<>

    {

    texts [i] .createOutlines ();

    }

    }

    Kind regards

    Cognet

  • How to display text ePub long chapters?

    Hello! I created some ePub books with an area of the page in 800 x 600. Each chapter is short and therefore fits on the area of the page. If the text doesn't overflow slightly I click on the lower right of the page to make it bigger, I see the text and change it if need is, then I drag the back of the lower right corner in place (sorry I don't know the correct terminology).

    However I now create a new ePub book that has much longer chapters that have text and images and I want to be able to read easily. By dragging the lower right to view the content will be heavy. Is there a better way of doing things?

    You need a fluid history in InDesign. You can break the chapters in creating a style of paragraph to that effect and by selecting it in the export dialog box.

    It is usually the title of the chapter.

    Bob

  • How to move text with styles between the docs? [CS 5.5 + JS]

    Here's what I have to get a document & insertion point reference:

      if (! app.selection[0] instanceof InsertionPoint) {
         alert("Your cursor must be a single insertion point! Try again.", "Insert single Word file");
          return;
     }
     var currDoc = app.documents[0];
     var importHere = currDoc.selection[0]
    

    I have the systematic Cleanup job, can enter the text cleaned with

     cleanupFrame.paragraphs.itemByRange(startFrame.paragraphs[0], startFrame.paragraphs[-1]).select();
     app.copy();
    
    

    But then, what? It should be simple enough to be invisible for me. I tried different things, but I have to need a boost.

    TIA.

    Use the Move() methods

    Moving text (to: LocationOptions[, reference: varies])

    Moves the text at the specified location.

    Parameter Type Description
    TO LocationOptions:
    LocationOptions.BEFORE
    LocationOptions.AFTER
    LocationOptions.AT_END
    LocationOptions.AT_BEGINNING
    LocationOptions.UNKNOWN
    The location relative to the object within the container object or reference.
    Reference Cell
    Column
    PageItem
    Line
    History
    Table
    Text
    The reference object. Note: Required when the parameter specifies before or after. Can accept: text, history, cell, row, column, Table or PageItem. (Optional)

Maybe you are looking for

  • Can I use the Windows Vista I had with my Toshiba laptop on virtual machine?

    Hey all I have changed Microsoft for Macintosh, but installed on a virtual machine (oracle vm virtual machine) my Windows Vista I got with my Toshiba Satellite A350D Notebook previous. I installed Vista with the recovery disk. Now he asks me the Wind

  • Notes app so much lag after updating iOS 9.3

    Is anyone else having problems with an extreme shift in the Notes application after update 9.3? I mean, extreme, it may take 15 seconds or more to meet the press of button, or the tapping of an icon, in the Notes application. This happens only in the

  • HP psc 5520 does not connect to the computer via the wireless

    HelloRecently I have not been able to print or scan anything using my laptop. Laptop computer and printer are connected wirelessly to my home network but when I try to set up the printer with a wi.fi connection, the laptop computer does not find the

  • allow traffic through remote client

    Hi friends, I'll explain my setup. I have an asa in datacenter with the static ip address, then site Office also having static ip, these two sites are connected via VPN and I configured the remote client to the data center. workers of remote client n

  • What is the next upcoming ACR refresh? (olympus pen f support)

    Hello! I just got myself an olympus F pen-and of course there is no raw support yet.So when is the next ACR update come?Thank you!