Weird behavior of text in Pages
Weird behavior of text in Pages
- Subject: Weird behavior of text in Pages
- From: Deivy Petrescu <email@hidden>
- Date: Sun, 27 Jul 2014 22:10:55 -0400
I just noticed a problem in Pages that is not there in Pages09
If I have text in a text box, when I retrieve it in Pages, it does not respond to text item delimiters.
It does in Pages09
Create a text box in a Pages document and on a pages Pages 09 document.
The scripts to run are
<script for Page>
tell application "Pages" to tell document 1
repeat with l from 1 to count every text item
if exists object text of text item l then
set tt to object text of text item l
set tp to paragraphs of tt
my tid(return)
--set td to text items of tt — it will error here when uncommented
return tp
--return td
end if
end repeat
end tell
on tid(x)
set AppleScript's text item delimiters to x
end tid
<script for Page>
<script for Page09>
tell application “Pages09" to tell document 1
repeat with l from 1 to count every graphic
if exists object text of graphic l then
set tt to object text of graphic l
set tp to paragraphs of tt
my tid(return)
set td to text items of tt — it works
return {tp,td}
end if
end repeat
end tell
on tid(x)
set AppleScript's text item delimiters to x
end tid
<script for Page09>
Deivy Petrescu
email@hidden
_______________________________________________
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