RE: Distinguishing between Paragraphs and Insets in a Framemaker Doc

2009-01-13 Thread Charles Monck
Hi Rick,

Very many thanks for that ... I have it doing just what I want!

Charlie Monck
Technical Author
Tel: 01235 822092
Oxford Semiconductor Ltd.
25 Milton Park, Abingdon
Oxfordshire
OX14 4SH
Registered in England no 2733820
Registered Address: As above 


-Original Message-
From: Rick Quatro [mailto:frameexp...@truevine.net] 
Sent: 12 January 2009 18:32
To: Charles Monck; framers@lists.frameusers.com
Subject: Re: Distinguishing between Paragraphs and Insets in a
Framemaker Doc

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 frameexp...@truevine.net.

 Send list messages to fram...@lists.frameusers.com.

 To unsubscribe send a blank email to
 framers-unsubscr...@lists.frameusers.com
 or visit 

http://lists.frameusers.com/mailman/options/framers/frameexpert%40truevi
ne.net

 Send administrative questions to listad...@frameusers.com. Visit
 http://www.frameusers.com/ for more resources and info. 

___


You are currently subscribed to Framers as arch...@mail-archive.com.

Send list messages to fram...@lists.frameusers.com.

To unsubscribe send a blank email to 
framers-unsubscr...@lists.frameusers.com
or visit 
http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com

Send administrative questions to listad...@frameusers.com. Visit
http://www.frameusers.com/ for more resources and info.


Distinguishing between Paragraphs and Insets in a Framemaker Doc

2009-01-13 Thread Charles Monck
Hi Rick,

Very many thanks for that ... I have it doing just what I want!

Charlie Monck
Technical Author
Tel: 01235 822092
Oxford Semiconductor Ltd.
25 Milton Park, Abingdon
Oxfordshire
OX14 4SH
Registered in England no 2733820
Registered Address: As above 


-Original Message-
From: Rick Quatro [mailto:frameexp...@truevine.net] 
Sent: 12 January 2009 18:32
To: Charles Monck; framers at lists.frameusers.com
Subject: Re: Distinguishing between Paragraphs and Insets in a
Framemaker Doc

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%40truevi
ne.net
>
> Send administrative questions to listadmin at frameusers.com. Visit
> http://www.frameusers.com/ for more resources and info. 



Distinguishing between Paragraphs and Insets in a Framemaker Doc

2009-01-12 Thread Charles Monck
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 arch...@mail-archive.com.

Send list messages to fram...@lists.frameusers.com.

To unsubscribe send a blank email to 
framers-unsubscr...@lists.frameusers.com
or visit 
http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com

Send administrative questions to listad...@frameusers.com. Visit
http://www.frameusers.com/ for more resources and info.


Distinguishing between Paragraphs and Insets in a Framemaker Doc

2009-01-12 Thread Charles Monck
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.