• 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: Snow and Pages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Snow and Pages


  • Subject: Re: Snow and Pages
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 1 Sep 2009 13:49:03 +0200


Le 1 sept. 2009 à 13:05:58, Axel Luttgens a écrit :

Le 1 sept. 09 à 12:47, Yvan KOENIG a écrit :

Hello

Under 10.4.11, I was able to run this kind of script:

set accidentals to {"A1", "A2", "A3"}

tell application "Pages"
activate
tell document 1
set theWords to get words
repeat with i from 1 to count of theWords
if item i of theWords is in accidentals then
set properties of word i to {font name:"ArialUnicodeMS"}
end if
end repeat
end tell
end tell

Under 10.6.0, it refuse to compile.

The words 'properties' and 'font name' remain in purple.

Same thing if I replace
set properties of word i to {font name:"ArialUnicodeMS"}
by
set font of word i to "ArialUnicodeMS"

In this case, it's 'font' which is not recognized.

Hello Yvan,

What about of

set font name of word i to "ArialUnicodeMS"

Here is a reprint of the dictionary:

word n [inh. item; see also Pages Text Suite] : This subdivides the text into words.
elements
contains attachments, attribute runs, characters, paragraphs, words; contained by attachments, attribute runs, characters, paragraphs, text, words, characters, insertion points, paragraphs, text, words.
properties
color (color) : The color of the first character.
font (Unicode text) : The name of the font of the first character.
size (integer) : The size in points of the first character.

If I uses Font Name as you offer, the two words remain purple but I may run the script.
So, from my point of view, there is a heavy smell of bug but at least for this property, there is a workaround.
I will look in the dictionary files if I may replace Font by Font Name.


Yvan KOENIG (VALLAURIS, France) mardi 1 septembre 2009 13:48:56



I
 _______________________________________________
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: Snow and Pages
      • From: Axel Luttgens <email@hidden>
References: 
 >Snow and Pages (From: Yvan KOENIG <email@hidden>)
 >Re: Snow and Pages (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Snow and Pages
  • Next by Date: Re: Snow and Pages
  • Previous by thread: Re: Snow and Pages
  • Next by thread: Re: Snow and Pages
  • Index(es):
    • Date
    • Thread