Script to get the first word on each page

Is there a script that would make a list of the first word of each page (or, preferably, create a text box on each page and place the next page's word in that)? My document's all in one story with one text frame on each page, although there are several other frames (header, page number) applied through master pages.

You wrote:  I changed the numbers to "8.0425in",  "4.5681in",  "8.1275in", "5.4319in" and it mostly worked - it placed the box at exactly 5 inches (X) and at 8.085 inches (Y) instead of 4.5681 inches. Any idea why?
No. I cannot reproduce the error you describe. I assume you've checked your numbers very closely in the script--I don't normally indicate measurements as strings.
you wrote: Something wasn't working with the styling - it kept freezing the program -
What do you mean by "freezing the program"? Is there a specific error message?
The paragraph style is named "firstword" and is all lowercase letters?
firstword paragraph style is NOT in a paragraph style group, right?
Is the first word on any page too long when formatted with the paragraph style "firstword" to fit in the text frame?

Similar Messages

  • Read the first word of each line in a text file

    i need to read the first word of each line of a text file.
    i know of line.split() but not actually sure how i would go about using it
    Any help most appreciated
    Many Thanks
    Ben

    Hi thanks for the reply!
    this is what i tried... and it still doesn't get me the first word of each line!
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.io.*;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.util.Calendar;
    import java.util.Scanner;
    import java.util.Vector;
    import java.text.SimpleDateFormat;
    import java.net.InetAddress;
    import java.net.UnknownHostException;
    import java.io.BufferedReader;
    public class testing {
         Vector progs=new Vector();
         Vector rand=new Vector();
         String[] tmp = new String [2];
         String str;
         String str2="ewerwer";
         String str3;
         public void programTest()
                   try
                             BufferedReader in = new BufferedReader(new FileReader("progList.log"));
                             while ((str = in.readLine()) != null)
                                  progs.add(str);
                        catch(IOException e)
                             System.out.println("cannot read file");
         //////THE ISSUES IS HERE....I WANT TO GET THE FIRST WORD FROM EACH LINE OF THE FILE!!!     
              try
                             BufferedReader in2 = new BufferedReader(new FileReader("eventLog.log"));
                             while ((str = in2.readLine()) != null)
                                  tmp = str.split(" ");
                                  System.out.println(tmp[0]);
                        catch(IOException e)
                             System.out.println("cannot read file");
    public static void main(String[] args)
                 testing B = new testing();
                 B.programTest();
               //  B.fileToVector();
                 //B.LoginWindow();
               //B.anomDetect();
    }//end class

  • Getting the first row for each group

    Hi Everyone,
    I have a query which returns a number of rows, all of which are valid. What I need to do is to get the first row for each group and work with those records.
    For example ...
    client flight startairport destairport stops
    A fl123 LGW BKK 2
    A fl124 LHR BKK 5
    B fl432 LGW XYZ 7
    B fl432 MAN ABC 8
    .... etc.
    I would need to return one row for Client A and one row for Client B (etc.) but find that I can't use the MIN function because it would return the MIN value for each column (i.e. mix up the rows). I also can use the rownum=1 because this would only return one row rather than one row per group (i.e. per client).
    I have been investigating and most postings seem to say that it needs a second query to look up the first row for each grouping. This is a solution which would not really be practical because my query is already quite complex and incorporating duplicate subqueries would just make the whole thing much to cumbersome.
    So what I really new is a "MIN by group" or a "TOP by group" or a "ROWNUM=1 by group" function.
    Can anyone help me with this? I'm sure that there must be a command to handle this.
    Regards and any thanks,
    Alan Searle
    Cologne, Germany

    Something like this:
    select *
    from (
       select table1.*
       row_number() over (partition by col1, col2 order by col3, col4) rn
       from table1
    where rn = 1In the "partition by" clause you place what you normally would "group by".
    In the "order by" clause you define which will have row_number = 1.
    Edit:
    PS. The [url http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions004.htm#i81407]docs have more examples on using analytical functions ;-)
    Edited by: Kim Berg Hansen on Sep 16, 2011 10:46 AM

  • Apple Mail - how to get the first word in a sentence to auto-capitalize

    How to get the first word in a sentence to auto-capitalize
    Anwar

    something to look forward to then, because we get used not to use our shift button any more, since iPhone and iPad do it for us. entourage and other ms stuff do it. pages does it too now (put it on in the auto-correct in preferences). bizarre however some loose the capitalization when you copy the text. pages to stickies or mail does not. that's good !

  • How to use script to get the first table row on each page?

    I create a print form to display a table. I set a conditional page break on this table, so the table rows on each page could be different.
    For example, there're total 50 rows in this table. On the 1st page, there're 5 rows, but on the 2nd page, there're only 2 rows, and so on...
    Now I want to get some value from the 1st table row on each page. How can do that? I can refer to a table row using TableRow[n], but I don't know how to calculate 'n' in script (either FormCalc or JavaScript) for the 1st row on each page.
    Any ideas?

    Hi Wei,
    There is an option of setting the overflow header in the pallette. You may check that out. It is basically used to have the table header to be seen in all pages, if the table is overflowing to multiple pages. You may put your first row as the overflow header.
    - hope this helps, Kindly update,
    thanks and regards,
    - anto.

  • How do you auto capitalize in the new version of pages? It no longer capitalizes the first word in each sentence and "I".

    I just updated to the new version, and this problem occurred right away. Please help!! 

    Congratulations on discovering the first of over 90 + features removed from Pages by Apple:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&mforum=iworktipsn trick
    Your previous version of Pages should still be in your Applications/iWork folder. It actually works.
    Peter

  • Select first word in each line of a text file to do something.

    How do I select the first word in each line to do something newer from a text file in Powershell?
    Example:
     GBL                            Primary    File            
     local                          Primary    File            
     localhost                      Primary    File            
     Opstest                        Primary    File            
     TrustAnchors                   Primary    File            
    99upgrade

    Hi 99,
    here's an example on how to do it:
    $lines = Get-Content "C:\ExampleFolder\Example.txt"
    foreach ($line in $lines)
    Write-Host ($line.Split(" "))[0]
    Just replace the Write-Host line in the loop with what you actually want to do with the first word in the line.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • ID only imports the first word of a 233 page word file (a novel)

    Folks!
    I've tried the old FIle-Place  make a text box and shift+enter..... and I ONLY get the first word of a 60,000 document.  Why?
    I need help ASAP!

    There are a lot of possibilities causing the problem, probably it is caused by some formatting done in Word.
    What text styles are used in Word? Do they have some break options? Repair them in Word.
    Are text boxes/frames used in Word? Remove them in Word.
    Is in Word some kind of break inserted (section, page, column, …)? Remove them in Word.
    But also important:
    When you import the Word file, do you select the import options during import? Do it!
    In InDesign is a character style selected before importing, before choosing the text tool? Don't.
    Because we don't know the source of the Word file it is hard to tell you what it is. A huge problem are Word files which have been converted from PDF or other programs.
    I would try to get rid from any Word imported formatting. Imported styles from Word I would never use in InDesign, I import them often, but I have my own styles predefined in InDesign. After importing I delete step by step the Word formatting. I know, I could map the Word Styles to existing InDesign styles, but in my experience some unexpected things are happening when the Word file comes from someone else than me, because a lot of people have only limitted knowledge when it comes to Word styles and document structure.

  • Is there a way to capitalize just the first word on a sentence on Pages v5.2?

    I'm sort of new to iwork, but i've been working with word for a long time and i know it very well.
    In word there is a tool in which you select a paragraph and you can capitalize the first word of each sentence.
    Is there a way i can do the same with pages v5.2? Pages would only let me capitalize each word of the selected paragraph.
    Thanks

    The previous major version of Pages (Pages '09 version 4.3) could automatically capitalize the first word of each sentence as you typed. That capability and a number of others was lost with the release of Pages v 5. You may still have the older version available in your Applications folder. You may also want to switch to Word or Open Office (free), both of which will likely be more familiar if you have worked with Word before.

  • Mail - Auto capitalize first word in each sentence

    When composing a message in mail is there a way to turn on auto capitalization for the word beginning each sentence?

    As far as I can tell you cant auto capitalize the first word of each sentence. I did however find out how to turn "i" into "I in case that is bugging you as well
    Go into System Preferences
    Click on Language and Text
    Choose the "Text" box on the menu bar
    It will bring you to the text substitution thingamajig where you can replace "i" with an "I". Once done it will work on Mail as well as most applications system wide.
    Hope that helps a little

  • How to get the date for the first monday of each month

    Dear Members,
    How to get the date for the first monday of each month.
    I have written the following code
    SELECT decode (to_char(trunc(sysdate+30 ,'MM'),'DAY'),'MONDAY ',trunc(sysdate+30 ,'MM'),NEXT_DAY(trunc(sysdate+30 ,'MM'), 'MON')) FROM DUAL
    But it look bith complex.
    Abhishek
    Edited by: 9999999 on Mar 8, 2013 4:30 AM

    Use IW format - it will make solution NLS independent. And all you need is truncate 7<sup>th</sup> day of each month using IW:
    select  sysdate current_date,
            trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month
      from  dual
    CURRENT_D FIRST_MON
    08-MAR-13 04-MAR-13
    SQL> Below is list of first monday of the month for this year:
    with t as(
              select  add_months(date '2013-1-1',level-1) dt
                from  dual
                connect by level <= 12
    select  dt first_of_the_month,
            trunc(dt + 6,'iw') first_monday_the_month
      from  t
    FIRST_OF_ FIRST_MON
    01-JAN-13 07-JAN-13
    01-FEB-13 04-FEB-13
    01-MAR-13 04-MAR-13
    01-APR-13 01-APR-13
    01-MAY-13 06-MAY-13
    01-JUN-13 03-JUN-13
    01-JUL-13 01-JUL-13
    01-AUG-13 05-AUG-13
    01-SEP-13 02-SEP-13
    01-OCT-13 07-OCT-13
    01-NOV-13 04-NOV-13
    FIRST_OF_ FIRST_MON
    01-DEC-13 02-DEC-13
    12 rows selected.
    SQL> SY.

  • How to capitalize the first letter of each  word in a sentence?

    Can anyone please explain how to split a sentence at a comma, or space or hyphen in to words and capitalize the first letter of each word. But I don't know how many words the sentence contains.

    HI,
    data : begin of itab occurs 0,
             words(40),
             end of itab.
    data : v_sentence(1000).
    data : lv_firstchar.
    split v_sentence at ',' into table itab.
    loop at itab.
    translate itab-words+0(1) to upper case.
    modify itab index sy-tabix.
    endloop.

  • How do I get Pages to capitalize the first word of a sentence and the letter 'I?"

    How do I get Pages to capitalize the first word of a sentance and the letter "i" automacticly?

    I am also having this problem. Does anyone have an answer?
    I jus upgraded from Pages 4.3 and it's in Preferences. Not so in Pages 5.0.

  • Is there a command to capitalize the first letter of each word?

    That is to say, can you capitalize the first letter of each word in a document like say, word? Or using the net?
    Thanks guys.
    (hope that makes sense.)

    Select the text, then Format->Change Case->Title Case (Word 2004).

  • Need to get the exact time of each picture that I saved ( maybe as a excel sheet or word )

    Hi guys,
    I am actually a new labview user. I have successfullly been able to save pictures. But unfortunately I got two problems. The first one is that I need to use two cameras at the same time. The program I have so far is for one camera. The second problem is that I need to get the exact time for each picture saved in the profile.
    I would appreciate if someone can help me with that. Anyway plz find attached the subvi.
    Regards,
    Abbas
    Attachments:
    Abbas progress.vi ‏54 KB

    Hi Abbas,
    First, I notice that you are using IMAQ for USB.  Is there any particular reason you are not using IMAQdx?  This is the newer, supported driver for use with USB cameras that supports acquiring from multiple cameras at the same time. 
    Check these two articles:
    Can I Acquire from Multiple USB Cameras Simultaneously Using IMAQdx?
    Can I Acquire from Two USB Cameras Simultaneously with NI-IMAQ for USB Cameras 1.0?
    And also this example (if you camera does not support acquiring from multiple cameras at the same time):
    Toggle Between Multiple USB Cameras
    As for timestamps, some cameras output them with the frame timing.  However, usually this is not a feature of USB cameras; if it is not, you can look into timing options within LabVIEW.  Try playing with the property node for IMAQdx and the Acquisition Attributes.
    Cheers,
    Marti C
    Applications Engineer
    National Instruments
    NI Medical

Maybe you are looking for

  • Can you put the tabs on top setting in 'Options - Tabs' so it's easy to get at?

    To save all this messing about with tabs everytime a new version of FF updates, I suggest the tabs on top setting is placed in 'Options - Tabs' so it's easy to get at. Lots of people seem to have this problem, for them and me, we prefer to have Tabs

  • External system to SRM

    Hi SRM specialist <u>Scenario:External system --> SRM</u> Now we are examining how to do the Interface. Firstly PO data is created in External system and this data will be needed to transfer to SRM. <u>Question</u> What can we do when we will do the

  • Unable to run the form in another Widow

    Hi Form, I have configured the Oracle 10gDS on WindowsXP Professional to work with Oracle 9i Database. When I am executing a form instead of opening in a seperate Browser window, it is opening in the same browser windows. What are all the requisite c

  • URGENT MAIL HELP NEEDED!

    Leopard has seriously screwed with Mail. Somehow while trying to make my .mac emails only appear in Mail and not on the server my .mac account has become Read Only. I can't move mails, delete mails, mark them as read. I can send and receive but nothi

  • Why Hiring Actions are not visiable with other login ID within the server.

    Dear Friends, I have scenario as follows. I have one server and all congiguration is done with one employee login ID also able to see Hiring actions through PA40 in same server. And when we login with other Authorized login id im not able to see thos