[Date Prev][Date Next]
[Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[New search]
To: "Rick Quatro" <rick@xxxxxxxxxxxxxxx>, <framers@xxxxxxxxxxxxxx>, <framers@xxxxxxxxx>
Subject: Re: FrameScript--applying character tag to range of text
From: "Jeff Williams" <jwilliams@xxxxxxxxxxxxxxx>
Date: Wed, 20 Jun 2001 10:31:40 -0700
References: <LYRIS-70761-88260-2001.06.20-09.41.48--rick#frameexpert.com@lists.frameusers.com> <001601c0f9b4$aef20520$4c744242@rochester.rr.com>
Sender: owner-framers@xxxxxxxxx
Thanks, Rick! That's an enormous help. I'll be sure to subscribe to framescript-users. - Jeff ----- Original Message ----- From: "Rick Quatro" <rick@frameexpert.com> To: "Jeff Williams" <jwilliams@cybersource.com>; <framers@frameusers.com>; <framers@omsys.com> Sent: Wednesday, June 20, 2001 11:13 AM Subject: Re: FrameScript--applying character tag to range of text > Hi Jeff, > > First of all, I would suggest that you subscribe to the framescript-users > group at http://groups.yahoo.com/group/framescript-users. > > Here is a script that will get you started. This will only work with > FrameScript 2 and FrameMaker 6. > > // Set variables for old name and new name. > Set OldName = 'Emphasis'; > Set NewName = 'Italic' > // Make sure the NewName character format exists. > Get Object Type(CharFmt) Name(NewName) > NewVar(vCharFmt); > If vCharFmt = 0 > MsgBox NewName + ' does not exist in this document. '; > LeaveSub; // Exit the script. > EndIf > // Find the OldName character format. > Find FromTextLoc(MainFlowInDoc) CharTag(OldName) > ReturnRange(vRange) ReturnStatus(vStatus) NoWrap; > Loop While(vStatus = 1) // No quotes around the one. > // Apply the new character format. > Apply TextProperties TextRange(vRange) > Properties(vCharFmt.Properties); > // Find the next occurrence. > Find FromTextLoc(vRange.End) CharTag(OldName) > ReturnRange(vRange) ReturnStatus(vStatus) NoWrap; > EndLoop > > Rick Quatro > Carmen Publishing > 716 659-8267 > rick@frameexpert.com > http://www.frameexpert.com > ** To unsubscribe, send a message to majordomo@omsys.com ** ** with "unsubscribe framers" (no quotes) in the body. **