🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8142

Font Problem

#8142
From: Jumbo_Meddley
Date: Sat, 11 Nov 2006 10:34
19 lines
1766 bytes
Hi guys

Anyone able to explain why the marked line of code throws up an error:

-- Inserts cell data and applies a style
	tell application "Adobe InDesign CS2"
		set aDocument to active document
		tell aDocument
			set CurrentCount to (count of characters of text frame 1) + 1
			****set applied font of insertion point of text frame 1 to CurrentFont****
			set contents of insertion point CurrentCount of text frame 1 to (CurrentText & return)			
		end tell
	end tell

Error message reads " Adobe InDesign CS2 got an error: Can't set applied font of insertion point of text frame 1 of document "blah.indd" to "Helvetica"

It doesn't matter what font I use either for CurrentFont (obvioulsy set in an earlier section of code) or even if I dispense with the variable and use a font name. If I surround the line witha TRY statement then it bypasses the step and populates the document with the CurrentText data - I just can't change the font....

Help is really appreciated!
Technical Details
Message-ID: <3bc23f99.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!83.128.0.11.MISMATCH!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ada3457619c73d36,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Jumbo_Meddley@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!83.128.0.11.MISMATCH!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Font Problem
Message-ID: <3bc23f99.-1@webcrossing.la2eafNXanI>
Date: Sat, 11 Nov 2006 02:34:57 -0800
Lines: 26
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit