Any way of adding random text to footer?

Discussion in 'Mac Apps and Mac App Store' started by cymro, Mar 31, 2010.

  1. cymro macrumors newbie

    Joined:
    May 23, 2008
    #1
    Hi,
    At the bottom of letters I write I would like to include random facts about the company. Rather than copying and pasting a random fact - I was wondering if anybody knows of a way to add random text to the footer of a Pages or word document?
     
  2. mysterytramp macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland
    #2
    You could create an AppleScript that would read in a datafile of random facts. Script would calculate the number of paragraphs, get a random number from the number of graphs, then pluck that random number graph into a variable.

    Then the script would launch your word processor and send a command something like: set footer to aVariable.

    Here's a bit of code in Pages:

    Code:
    tell application "Pages"
    	set odd footer of section 1 of document 1 to "random bit of text"
    end tell
    (You can't set the footer directly in Pages, you need to set the odd footer then the even footer, apparently)

    Which word processor are you using?

    mt
     
  3. cymro thread starter macrumors newbie

    Joined:
    May 23, 2008
    #3
    Hi - thanks for your answer. I use both word and pages - though prefer pages. I am a little unsure of scripts though! thanks again!
     

Share This Page