MACSCRPT Archives

August 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ludwig Geier <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 2 Aug 2007 19:40:49 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
Hello,
I'll tried to replace a selected text in FrameMaker by a FrameMaker  
variable.

Par example:
String "Purchase Price List in EUR"
The "EUR" should be substituted to the FrameMaker variable "currency"


Code fragment:

tell application "FrameMaker 7.0"

...

	set myText to (get text of selection)
	set allVar to get properties of every variable format of document 1
	
	...

	set myFlag to false
	repeat with j from 1 to (count items in allVar)
		
		if myText is equal to (get format definition of (item j of allVar))  
then
			set myFlag to true
			set myVarName to get (name of (item j of allVar))
			exit repeat
		end if

	end repeat

	...

	if myFlag is true then
-->	set ....  ((intention: replace selected text with the variable  
itself not the contents of the variable))

Any idea, how the "set" command looks like?


All ideas are welcome; thanks in advance!


Ludwig

ATOM RSS1 RSS2