• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Pages-inserted/generated page numbers throw off char indexing in body text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pages-inserted/generated page numbers throw off char indexing in body text


  • Subject: Re: Pages-inserted/generated page numbers throw off char indexing in body text
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 01 Mar 2013 11:01:05 +1100

On 01/03/2013, at 7:51 AM, Eric Hon-Anderson <email@hidden> wrote:

How can we find a way to account for the character counts and locations of these generated page numbers?

I suspect you're going to have to get the body text differently, perhaps via the clipboard like this:

tell application id "com.apple.iWork.Pages" -- Pages.app
activate
select body text of document 1
end tell
tell application id "com.apple.systemevents" -- System Events.app
tell process "Pages"
delay 0.1
keystroke "c" using {command down}
end tell
end tell
set theText to the clipboard as text

-- 
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Pages-inserted/generated page numbers throw off char indexing in body text (From: Eric Hon-Anderson <email@hidden>)

  • Prev by Date: Re: Mail GUI script error (koenig.yvan)
  • Next by Date: Scripting a pause for user input in PS CS6
  • Previous by thread: Pages-inserted/generated page numbers throw off char indexing in body text
  • Next by thread: Scripting a pause for user input in PS CS6
  • Index(es):
    • Date
    • Thread