Distinguishing between Paragraphs and Insets in a Framemaker Doc

Rick Quatro frameexpert at truevine.net
Mon Jan 12 10:32:09 PST 2009


Hi Charles,

You can do something like this, assuming the oDoc is your document object.

Get TextList InObject(oDoc.MainFlowInDoc) NewVar(tTextList)
  PgfBegin TextInsetBegin;
Loop While(i <= tTextList.Count) LoopVar(i) Init(1) Incr(1)
  If tTextList[i].TextType = 'PgfBegin'
    Set oPgf = tTextList[i].TextData;
  ElseIf tTextList[i].TextType = 'TextInsetBegin'
    Set oTi = tTextList[i].TextData;
  EndIf
EndLoop

Rick Quatro
Carmen Publishing Inc
585-659-8267
www.frameexpert.com


> Hello ...
>
> Complete FrameScript newbie here!
>
> I wonder if there is a way of using FrameScript to go through a document
> taking one course of action if the next "object" in the document is a
> paragraph (Here I wish to add a text inset - and that is all working
> fine)) and another course of action if the next "object" is a text inset
> (when I find a particular text inset I want to edit the last previous
> paragraph which is "Heading1" format. "Pseudo-code" for the main "path"
> of the script would be something like:-
>
> Local lvObject(pvDocVar.FirstObjectInDoc);
>
> Loop While(lvObject)
>
> If (Object = Paragraph) then
>
> ... do something here ...
>
> Else if (Object = TextInset) then
>
> ... do something else here ...
>
> Endif
>
> Set lvObject = lvTextInset.NextObjectInDoc;
>
> EndLoop;
>
> Hoping that someone can help !
>
> Thanks.
>
> _______________________________________________
>
>
> You are currently subscribed to Framers as frameexpert at truevine.net.
>
> Send list messages to framers at lists.frameusers.com.
>
> To unsubscribe send a blank email to
> framers-unsubscribe at lists.frameusers.com
> or visit 
> http://lists.frameusers.com/mailman/options/framers/frameexpert%40truevine.net
>
> Send administrative questions to listadmin at frameusers.com. Visit
> http://www.frameusers.com/ for more resources and info. 




More information about the framers mailing list