• 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: Intro and Can this be done
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intro and Can this be done


  • Subject: Re: Intro and Can this be done
  • From: "Christopher C. Stone" <email@hidden>
  • Date: Thu, 1 Feb 2001 21:45:47 -0600

At 02/01/2001 21:46 -0500, Ken Dobson wrought:

> Now this has me a bit upset
>
> I found this problem simple enough to solve in MS Word, a look through the
> dictionary and a couple of minutes watching my script in the event log and I
> was able to compile the following:
> --
> tell application "Microsoft Word"
> activate
> repeat with i from 1 to count of words of window 1
> if word i is italic then
> set italic of word i to false
> set bold of word i to true
> set color of word i to red
> set highlight of word i to yellow
> end if
> end repeat
> save window 1
> end tell
___________________________________________________________________________

A quick look at the dictionary yields this sort of mess:

(Major wrappage)

tell application "AppleWorks"
if exists of document 1 then
tell document 1
set cntr to count of words

if (get on styles of (style of word 1)) contains italic then

set style of word 1 to {class:text style info, on styles:{bold}, off styles:{italic, underline, outline, shadow, condense, extend, strikethru, superscript, subscript, superior, inferior, double underline}}

end if
end tell
end if
end tell

I'd think it would be possible to tell every word whose style record contained an on-style of bold to set it's attributes to whatever is desired, but I've not found a method of doing so.


Best Regards,

Christopher Stone
______________________________
StoneWorks Computer Consulting
email@hidden


References: 
 >Re: Intro and Can this be done (From: Ken Dobson <email@hidden>)

  • Prev by Date: Re: loading a subroutine properly
  • Next by Date: Parent property & load script - info
  • Previous by thread: Re: Intro and Can this be done
  • Next by thread: Re: Intro and Can this be done
  • Index(es):
    • Date
    • Thread