• 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 TextEdit Insertion point
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting TextEdit Insertion point


  • Subject: Re: Setting TextEdit Insertion point
  • From: KOENIG Yvan <email@hidden>
  • Date: Mon, 24 Sep 2007 13:22:53 +0200


Le 23 sept. 07 à 22:34, Quark67 a écrit :


Le 14 juil. 07 à 06:18, Bill Briggs a écrit :

At 1:12 AM -0300 7/14/07, Bill Briggs wrote:
select insertion point before line 2

Also note that the syntax...

     select insertion point before paragraph 2

 also works, if you prefer.

- web


This don't run with Pages 2 or 3.

tell application "Pages"
make new document with properties {body text:"first second third fourth"}
tell document 1
make new text at after character 2 of word 2 with data "$"
select insertion point before word 3
make new text with data "before "
end tell
end tell


Gives : (in Page 3. In Page 2, there are error...)

"first se$cond third fourthbefore "

and not
"first se$cond before third fourth"

Why?

How must I use "insertion point" with "Pages" ? Thanks.
(if you don't have Pages 3, you can download a trial version from Apple website).

You made an error when writing what would be the correct result.

At each test, the insertion point is set just before the added $ which is treated as a word delimiter.

You may check with this code:

tell application "Pages"

make new document with properties {body text:"first second third fourth"}
tell document 1
make new text at after character 2 of word 2 with data "$"
--select insertion point before word 3
make new text at before word 3 with data "before "
end tell
end tell


Yvan KOENIG


_______________________________________________ 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: 
 >Re: Setting TextEdit Insertion point (From: Quark67 <email@hidden>)

  • Prev by Date: Re: Fwd: mount volume
  • Next by Date: Re: mount volume
  • Previous by thread: Re: Setting TextEdit Insertion point
  • Next by thread: Is it possible to Applescript the deletion and addition of items from a Finder window's sidebar?
  • Index(es):
    • Date
    • Thread