Working with selection in iWork Pages '09
This would seem like a simple issue, and it may well be, but I am stumped.
In Pages, I have a document with some text on it, say "Hello World"
The cursor is at the end of the sentence, blinking. (No return after "Hello World")
I want to insert a return and have the cursor end up sitting after that return, (blinking).
I have tried this with limited results:
tell application "Pages" to tell document 1
set mySel to (get selection)
set selection to mySel & return
end tell
The problem here is that while this does insert a return after "Hello World", the selection is still at the end of "Hello World"
Consequently, if I were to start typing, the new text would be at the end of paragraph 1, and not at the end of paragraph 2.
All I am trying to do is insert a new paragraph at the cursor and begin inserting text from there.
Any help is greatly appreciated.
In Pages, I have a document with some text on it, say "Hello World"
The cursor is at the end of the sentence, blinking. (No return after "Hello World")
I want to insert a return and have the cursor end up sitting after that return, (blinking).
I have tried this with limited results:
tell application "Pages" to tell document 1
set mySel to (get selection)
set selection to mySel & return
end tell
The problem here is that while this does insert a return after "Hello World", the selection is still at the end of "Hello World"
Consequently, if I were to start typing, the new text would be at the end of paragraph 1, and not at the end of paragraph 2.
All I am trying to do is insert a new paragraph at the cursor and begin inserting text from there.
Any help is greatly appreciated.
Mac Pro, Mac OS X (10.6.3)