🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19820

Font Type Variable

#19820
From: rob day
Date: Sat, 16 Nov 2002 14:54
37 lines
1913 bytes
Hi 
I have a script which gathers info from an active document and fills out a form for output. Part of it gathers font info: 

copy "" to docFonts 
tell application "InDesign 2.0.1" 
	activate 
	tell active document 
		set fontName to name of every font of document 1 as list 
		set fontType to type of every font of document 1 as list 
		repeat with i from 1 to count of items in fontName 
			copy item i of fontName to theFont 
			copy item i of fontType to thetype 
			repeat with i from 1 to count of items in fontType 
			end repeat 
			copy docFonts & theFont & tab & thetype & tab & "yes" & return to docFonts 
			end repeat 
		copy docFonts to x 
	end tell 
end tell 

When I run the script from Script Editor I get what I want: 

Eboy	EXTGamma	type 1	yes 
ITC Officina Sans	Bold	type 1	yes 
ITC Officina Sans	Book	type 1	yes 
Times	Regular	TrueType	yes 

If I run it any other way-- as an app or from Quickeys or the script menu, the font type is returned incorrectly: 

Eboy	EXTGamma	?constant ****ftT1?	yes 
ITC Officina Sans	Bold	?constant ****ftT1?	yes 
ITC Officina Sans	Book	?constant ****ftT1?	yes 
Times	Regular	?constant ****ftTT?	yes 

Anyway to fix this? I'm running OS 10.2.1 
Thanks 
Rob
Technical Details
Message-ID: <1de6a01a.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!feedme.news.mediaways.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,e17c95f60e79f178,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-11-16 08:26:56 PST
From: "rob day" <vevans@mediaone.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!feedme.news.mediaways.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Font Type Variable
Message-ID: <1de6a01a.-1@WebX.la2eafNXanI>
Date: Sat, 16 Nov 2002 06:54:50 -0800
Lines: 40
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit