• 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: AppleScript, Pages and Text boxes (part 1)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript, Pages and Text boxes (part 1)


  • Subject: Re: AppleScript, Pages and Text boxes (part 1)
  • From: "Stockly, Ed" <email@hidden>
  • Date: Thu, 18 Mar 2010 10:40:19 -0700
  • Thread-topic: AppleScript, Pages and Text boxes (part 1)

Title: Re: AppleScript, Pages and Text boxes (part 1)
I don’t have Pages here at work, but I seem to remember something like this:

Set maybe to singleColor of properties of text box I

Set singleColor of properties of text box I to maybe

Or

Tell properties of text box I
Set maybe to singleColor  

Set singleColor  to maybe

end


On 3/18/10 10:26 AM, "Yvan KOENIG"  wrote:

One more time, I'm fighting against Pages.

If I apply this script

tell application "Pages" to tell document 1
set nbTextBoxes to count of text box
repeat
with i from 1 to nbTextBoxes
set bProps to (get properties of text box i)
set maybe to horizontal position of bProps
log maybe
end repeat
end
tell

to a Pages WP document embedding a text box with an yellow background, I get this log report:

tell application "Pages"
count every text box of document 1
1
get properties of text box 1 of document 1
{stroke type:none, image fill type:missing value, horizontal position:46.0, class:text box, stroke width:missing value, text fit:rectangle, width:200.0, stroke color:missing value, extra space:12.0, wrap:center, image data:missing value, placement:moving, shadow angle:missing value, vertical position:57.0, fill type:color, height:100.0, object text:"
text box 2
", id:5107277, containing page:page 1 of document id 5441209, shadow blur:missing value, shadow opacity:missing value, shadow color:missing value, color angle:missing value, opacity:100.0, locked:0, containing layer:missing value, name:missing value, shadow:missing value, rotation:0.0, shadow offset:missing value, start color:missing value, single color:{65535, 65535, 13107}, end color:missing value}
(*46.0*)
end tell

If I replace
set maybe to horizontal position of bProps
by
set maybe to single color of bProps

I get :

tell application "Pages"
count every text box of document 1
1
get properties of text box 1 of document 1
…
"
Impossible d’obtenir single color of {stroke type:none, image fill type:missing value, horizontal position:46.0, class:text box, stroke width:missing value, text fit:rectangle, width:200.0, stroke color:missing value, extra space:12.0, wrap:center, image data:missing value, placement:moving, shadow angle:missing value, vertical position:57.0, fill type:color, height:100.0, object text:\"text box 2
\", id:5107277, containing page:page 1 of document id 5441209 of application \"Pages\", shadow blur:missing value, shadow opacity:missing value, shadow color:missing value, color angle:missing value, opacity:100.0, locked:0, containing layer:missing value, name:missing value, shadow:missing value, rotation:0.0, shadow offset:missing value, start color:missing value, single color:{65535, 65535, 13107}, end color:missing value}.
"

to be continued…






_______________________________________________
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
 _______________________________________________
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: AppleScript, Pages and Text boxes (part 1)
      • From: Yvan KOENIG <email@hidden>
References: 
 >AppleScript, Pages and Text boxes (part 1) (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: AppleScript, Pages and text box (part 2)
  • Next by Date: Re: AppleScript, Pages and Text boxes (part 1)
  • Previous by thread: AppleScript, Pages and Text boxes (part 1)
  • Next by thread: Re: AppleScript, Pages and Text boxes (part 1)
  • Index(es):
    • Date
    • Thread