Article View: adobe.scripting.indesign
Article #18851Re: Font Book
From: Olivier Berquin
Date: Thu, 13 Feb 2003 08:41
Date: Thu, 13 Feb 2003 08:41
53 lines
2385 bytes
2385 bytes
Hi Adamcoop,
Try this, and tell me if it's work for you:
set mySize to 9
set sampleText to "Quick Brown Dog Thing"
tell application "InDesign 2.0.2"
activate
set myFontList to get fonts
set the fontCount to the count of myFontList
set myDocument to make document
set myMarginPreferences to margin preferences
tell page 1 of myDocument
set myTextFrame to make text frame with properties {geometric bounds:{"20 mm", "12 mm", "285 mm", "198 mm"}}
end tell
repeat with i from 1 to fontCount
set thisText to (the name of item i of myFontList as string)
set text contents of insertion point -1 of myTextFrame to (thisText & tab & sampleText & return)
if myTextFrame is overflows then
-- thanks to Dave Saunders for this part (insert a new page and flow text)
set myFrame to myTextFrame
tell myDocument
-- be carrefull: use YOUR master page name (I work with a french version)
set myMaster to object reference of master spread "A-Page type"
set myNewPage to make page with properties {applied master:myMaster}
end tell
set active spread of active window to parent of myNewPage -- show the new page
tell myNewPage
set myTextFrame to make text frame with properties {geometric bounds:{"20 mm", "12 mm", "285 mm", "198 mm"}}
end tell
set next text frame of myFrame to myTextFrame -- text flow
end if
tell paragraph i of parent story of myTextFrame
set applied font to item i of myFontList
set point size to mySize
end tell
end repeat
end tell
Olivier.
Technical Details
Message-ID:
<1de7cbf2.2@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de7cbf2.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,d09c85b680b6e27a X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-13 01:08:03 PST From: "Olivier Berquin" <olb@microscript.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Font Book Message-ID: <1de7cbf2.2@WebX.la2eafNXanI> Date: Thu, 13 Feb 2003 00:41:05 -0800 References: <1de7cbf2.-1@WebX.la2eafNXanI> Lines: 56 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit