• 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: Setting Pages Insertion point (was Setting TextEdit S( )
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting Pages Insertion point (was Setting TextEdit S( )


  • Subject: Re: Setting Pages Insertion point (was Setting TextEdit S( )
  • From: Axel Luttgens <email@hidden>
  • Date: Thu, 27 Sep 2007 14:23:15 +0200

On 27/09/07 13:35, KOENIG Yvan wrote:

Hello

As you seems to be mora aware than I am about Insetion points, I will ccept that my assumption was wrong.

- 1 - what is wrong here:

tell application "Pages" to tell document 1
    get properties of insertion point 12 of body text
end tell

which returns: "Erreur dans Pages : NSReceiverEvaluationScriptError: 4"

Hello Yvan,

You need to use a correct reference form for referencing the insertion point you are interested in; for example:

tell application "Pages"
   tell front document
       get properties of insertion point before character 12 of body text
   end tell
end tell

assuming there are at least 12 characters in the the document.

- 2 -you wrote:

"You might also try setting the
contents of an insertion point."

I tried with:

tell application "Pages" to tell document 1
    set contents of insertion point 12 of body text to " truc "
end tell

Well, I'm discovering Pages' scripting thanks to this thread and thus needed some trials and errors.
Of course, the same as above holds.
Otherwise this one, for example, "works" here:


tell application "Pages"
tell front document
set text of insertion point before character 12 of body text to "truc"
end tell
end tell


Another example of lying dictionary?

HTH,
Axel
_______________________________________________
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
  • Follow-Ups:
    • Re: Setting Pages Insertion point (was Setting TextEdit S( )
      • From: KOENIG Yvan <email@hidden>
References: 
 >Re: Setting Pages Insertion point (was Setting TextEdit S( ) (From: Shane Stanley <email@hidden>)
 >Re: Setting Pages Insertion point (was Setting TextEdit S( ) (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: [OT] Setting Pages Insertion point (was Setting TextEdit S( )
  • Next by Date: [InDesign CS3]package command bug
  • Previous by thread: Re: Setting Pages Insertion point (was Setting TextEdit S( )
  • Next by thread: Re: Setting Pages Insertion point (was Setting TextEdit S( )
  • Index(es):
    • Date
    • Thread