• 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
[possibly OT] Font/Appleworks Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[possibly OT] Font/Appleworks Scripting


  • Subject: [possibly OT] Font/Appleworks Scripting
  • From: Greg Back <email@hidden>
  • Date: Wed, 20 Mar 2002 17:47:06 -0500

Hi All-
I'm trying to write a sort of simple script to find all the fonts on my computer and show them all in one document. It works fine, except
that some parts do not change to their own font (they stay at the default). They seem to be the ones that do not appear in the fonts menu in appleworks, but I cannot determine what makes them show up there. I realize that this is not exactly an Applescript question, but I figured that someone might know a solution, or any other locations fonts might be? The script is below:

<script - watch line wraps (esp. 2nd "set")>

set teststr to " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
set listfonts to (list folder alias "iMac OS X:System:Library:Fonts:") & (list folder alias "iMac OS X:Library:Fonts:") & (list folder alias "iMac OS X:Users:greg:Library:Fonts:") & (list folder alias "iMac OS 9:System Folder:Fonts:")
set goodfonts to {}
repeat with font in listfonts
set font to font as string
if font does not end with "cache" then set goodfonts to goodfonts & font
end repeat

set truncfonts to {}
repeat with font in goodfonts
if font ends with ".dfont" then set font to text 1 thru -7 of font
set truncfonts to truncfonts & font
end repeat
tell application "AppleWorks 6"
activate
set fontdoc to make new document at front with properties {document kind:WP}
repeat with fnt in truncfonts
set end of fontdoc to fnt & teststr & return & return
set font of paragraph before last paragraph of fontdoc to (fnt as international text)
end repeat
end tell
<script>

Thanks in Advance to all!!!

--
Greg Back
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Looking for an Applescript programmer
  • Next by Date: Re: AppleScript Language Guide [ASLG] (was Beginners question)
  • Previous by thread: Re: Stumped with open file
  • Next by thread: Re: AS manuals
  • Index(es):
    • Date
    • Thread