Joe,
I had a similar predicament a few months ago, and being a very new
FrameScript user (and I haven't progressed since :-( ), the blokes at
FrameScript "helped" (well wrote, and I nodded at appropriate places) the
following.
My next step was to get it working at book level, but I failed dismally, so
I will be very interested in your final version
jjj
> John Pitt, Technical Writer
> Wilcom Pty Ltd
> Sydney, Australia
> +61 2 9578 5176
> mailto:jpitt@...
> or
> mailto:johnpitt@...
>
>
>
IF ActiveDoc = 0
MSGBOX 'No Active Document';
LEAVESUB;
ENDIF
/*SET dcount = 0;
NEW StringList NewVar(clist);
LOOP ForEach(CharFmt) In(ActiveDoc) LoopVar(charfmtvar)
ADD Member (charfmtvar.Name) To(clist);
SET dcount = dcount + 1;
ENDLOOP
IF dcount < 1
MSGBOX 'No Character formats found'
LEAVESUB;
ENDIF
DIALOGBOX Type(ScrollBox) Title('Select a Character format')
List (clist) NewVar(XCFname) Button(btnvar);
IF btnvar = CANCELBUTTON
LEAVESUB;
ENDIF */
NEW PropertyList NewVar(emptyCharFmt) CharTag('');
Add Member('ZRevise') To(emptyCharFmt);
LOOP ForEach (Pgf) In(ActiveDoc) LoopVar(pgfvar)
IF pgfvar.Page.ObjectName = 'BodyPage' // Look at pgfs on body pages
only
SET InStartRange = False;
GET TextList NewVar(tlist) InObject(pgfvar) CharPropsChange;
SET StartOffset = 0; // Set to empty
LOOP LoopVar(i) Incr(1) While(i<=tlist.count) InitVal(1)
GET Member Number(i) From(tlist) NewVar(titem);
SET chglist = titem.TextData;
FIND Member('CHARTAG') InList(chglist) Returnstatus(stat); // Did
a char fmt change?
IF stat = 1 // Yes
NEW TextLoc NewVar(tloc) Object(pgfvar)
Offset(titem.TextOffset);
SET errorcode = 0;
GET TextProperties NewVar(txprops) TextLoc(tloc);
IF InStartRange = False
IF txprops.CharTag = XCFname
SET InStartRange = True;
SET StartOffset = titem.TextOffset;
ENDIF
ELSE
IF txprops.CharTag not = XCFname
NEW TextRange NewVar(trange) Object(pgfvar)
Offset(StartOffset)
Object(pgfvar) Offset(titem.TextOffset);
APPLY TextProperties TextRange(trange)
Properties(pgfvar.properties);
APPLY TextProperties TextRange(trange)
Properties(emptyCharFmt);
SET InStartRange = False; // Reset to initial condition
ENDIF
ENDIF
ENDIF
ENDLOOP
IF InStartRange // Handle case where Char Format is at the end of a
Pgf
NEW TextRange NewVar(trange) Object(pgfvar) Offset(StartOffset)
Object(pgfvar) Offset(OBJENDOFFSET);
APPLY TextProperties TextRange(trange)
Properties(pgfvar.properties);
APPLY TextProperties TextRange(trange)
Properties(emptyCharFmt);
SET InStartRange = False; // Reset to initial condition
ENDIF
ENDIF
ENDLOOP
> -----Original Message-----
> From: jhlakey@... [SMTP:jhlakey@...]
> Sent: Friday, September 10, 1999 6:46 AM
> To: framescript-users@egroups.com
> Subject: [framescript-users] Script to strip char tag?
>
> I am a new FrameScript user, and I am (predictably?) having some
> problems working out the syntax. I'm hoping that someone might be able
> to give me some direction with my current problem. Here is what I am
> trying to do:
>
> For a long time we have used a character tag named Change Bar to apply
> change bars to our FM files. The problem with this approach is that the
> Clear Change Bars function in FM will clear change bars applied this
> way, but the text retains the Change Bar tag (as *Change Bar). This was
> not really a problem for us since the change bars didn't appear on the
> page... until we started using a third party program for html
> conversion (Quadralay's WebWorks). WebWorks doesn't care what appears
> on the page. It applies formatting according to how the text is tagged.
> So now our problem is how to remove the Change Bar character tag. We
> have a number of large manuals, so we are looking for a book-level
> solution.
>
> So far I have been able to write a book-level script that removes the
> Change Bar tag from the character tag catalog, but the text is still
> showing the *Change Bar tag. Any ideas on how I can strip out this tag?
>
> One more note--the *Change Bar tag is usually not applied to whole
> paragraphs, so I don't know if a paragraph-level (as opposed to
> string-level) fix will work. I think I've got a grasp on applying a
> script to a whole book, so I really just need a subroutine that will
> strip out this particular tagging. Any help is *greatly* appreciated.
>
> Joe Lakey
> Technical Writer
> Federal Express Corp.
> jhlakey@...
>
>
> ------------------------------------------------------------------------
> Want the power to purchase wisely? Productopia has the answers.
> http://clickhere.egroups.com/click/553
>
>
> eGroups.com home: http://www.egroups.com/group/framescript-users
> http://www.egroups.com - Simplifying group communications
>
>
>
Hi All,
Before my mew question I would like to thank's to Nancy McCoy and Rick Quatro
for you help; Thank again.
I try to Import some word-97(ch**.doc) files to my Frame(chap.FM) file.
I would like to inport the files with the following condition.
Import the ch**.doc "ByCopy", "RemoveNamualBreaks" and "RemoveOverrides"
and save it in chap.FM files, and rename the "chap.FM" to ch**.FM.
Thank you.
Carlos
Hi All:
I'm trying to extract the string from text with class name formatting;
however, I'm finding it really difficult. Is there a dummies book for
framescript yet : ) ? Any suggestions would be greatly appreciated.
Set Count = 0; // Set the counter to 0
// Make a loop to check each paragraph in the active document
Loop ForEach(Pgf) In(ActiveDoc) LoopVar(vPgf)
// Test for character property changes within the current paragraph.
Get TextList InObject(vPgf) NewVar(vTList) CharPropsChange;
If vTList.Size > 0
// If there are character property changes, test each one with a loop.
Loop While(vCounter <= vTList.Size) LoopVar(vCounter) Init(1) Incr(1)
Get Member Number(vCounter) From(vTList) NewVar(vPropChange);
// For each property change, you must make a text location variable,
// so that you can get the text properties at that location.
New TextLoc NewVar(vTextLoc) Object(vPgf)
Offset(vPropChange.TextOffset);
Get TextProperties TextLoc(vTextLoc) NewVar(vTProps);
// Here is the test for the character tag.
If vTProps.CharTag = 'class name'
Set TestString = vTProps;
Get String FromString(TestString) NewVar(extractstr)
If extractstr= 'SREGraphView'
Set Count = Count+1;
EndIf
EndIf
EndLoop
EndIf
EndLoop
// Display the message box.
MsgBox 'The number of words with class name formatting is '+Count;
I would make one minor change to the loop:
Loop ForEach(Pgf) In(ActiveDoc.MainFlowInDoc) LoopVar(pgfobj)
Technically, a list of paragraphs in the document may not be in document
order, but a list of paragraphs in the main flow SHOULD be. Also, these
kinds of loops will check master pages and references pages. If you really
want to play it safe, use the alternative loop below. This will test the
paragraphs in document order, restricting the loop to the main document
flow.
Set pgfobj = ActiveDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
Loop While(pgfobj)
...
if pgfobj.name = '1Bulleted'
if pgfobj.NextPgfInDoc NOT = 'Bulleted'
Get Object Type(PgfFmt) Name('Last Bulleted') NewVar(newpgffmt);
Set pgfobj.properties = newpgffmt.properties;
endif
endif
...
Set pgfobj = pgfobj.NextPgfInFlow;
EndLoop
Rick Quatro
Carmen Publishing
716 659-8267
frameexpert@...
FrameScript Information at http://www.mindspring.com/~frameexpert
> Hi Carlos:
> 1. Set your script to loop through all the paragraph objects in your
> document.
> 2. Set up an if-endif statement to "catch" all the occurrences of
> "1Bulleted"
> 3. Once there, check to see if the next pgfobj is "1Bulleted"
> 4. If it is not, then set the properties of this paragraph tag (1Bulleted)
> to be the properties of the "Last Bulleted" tag.
>
> Something like this:
>
> Loop ForEach (Pgf) In(ActiveDoc) LoopVar(pgfobj)
> ...
> if pgfobj.name = '1Bulleted'
> if pgfobj.NextPgfInDoc NOT = 'Bulleted'
> Get Object Type(PgfFmt) Name('Last Bulleted') NewVar(newpgffmt);
> Set pgfobj.properties = newpgffmt.properties;
> endif
> endif
> ...
> EndLoop
>
> You can use this general approach to accomodate 2Bulleted tags as well as
> combinations of both. Hope this helps.
>
> Nancy McCoy
> 909-738-9332
> docuprose@...
>
> > -----Original Message-----
> > From: cguillermo@... [mailto:cguillermo@...]
> > Sent: Wednesday, September 08, 1999 9:07 AM
> > To: framescript-users@eGroups.com
> > Subject: [framescript-users] Change Bulleted List
> >
> >
> > Hi all,
> > I have a document that have some set of Bulleted List and Second
> > Bulleted List.
> > But my problem here is that in each set of Bulleted list I have to
> > change the
> > style of the last bulleted on the list to "BULLETED LAST" Style.
> >
> > Some body have idea how I can find the last Bulleted list on the set
> > and apply style "BULLETED LIST" on my Document.
> >
> > Thank you for you help.
> >
> > Carlos
> >
> >
> > ------------------------------------------------------------------------
> > MyPoints-Free Rewards When You're Online.
> > Start with up to 150 Points for joining!
> > http://clickhere.egroups.com/click/805
> >
> >
> > eGroups.com home: http://www.egroups.com/group/framescript-users
> > http://www.egroups.com - Simplifying group communications
> >
> >
> >
> >
> >
>
>
>
> ------------------------------------------------------------------------
> MyPoints-Free Rewards When You're Online.
> Start with up to 150 Points for joining!
> http://clickhere.egroups.com/click/805
>
>
> eGroups.com home: http://www.egroups.com/group/framescript-users
> http://www.egroups.com - Simplifying group communications
>
>
>
>
Hi Carlos:
1. Set your script to loop through all the paragraph objects in your
document.
2. Set up an if-endif statement to "catch" all the occurrences of
"1Bulleted"
3. Once there, check to see if the next pgfobj is "1Bulleted"
4. If it is not, then set the properties of this paragraph tag (1Bulleted)
to be the properties of the "Last Bulleted" tag.
Something like this:
Loop ForEach (Pgf) In(ActiveDoc) LoopVar(pgfobj)
...
if pgfobj.name = '1Bulleted'
if pgfobj.NextPgfInDoc NOT = 'Bulleted'
Get Object Type(PgfFmt) Name('Last Bulleted') NewVar(newpgffmt);
Set pgfobj.properties = newpgffmt.properties;
endif
endif
...
EndLoop
You can use this general approach to accomodate 2Bulleted tags as well as
combinations of both. Hope this helps.
Nancy McCoy
909-738-9332
docuprose@...
> -----Original Message-----
> From: cguillermo@... [mailto:cguillermo@...]
> Sent: Wednesday, September 08, 1999 9:07 AM
> To: framescript-users@eGroups.com
> Subject: [framescript-users] Change Bulleted List
>
>
> Hi all,
> I have a document that have some set of Bulleted List and Second
> Bulleted List.
> But my problem here is that in each set of Bulleted list I have to
> change the
> style of the last bulleted on the list to "BULLETED LAST" Style.
>
> Some body have idea how I can find the last Bulleted list on the set
> and apply style "BULLETED LIST" on my Document.
>
> Thank you for you help.
>
> Carlos
>
>
> ------------------------------------------------------------------------
> MyPoints-Free Rewards When You're Online.
> Start with up to 150 Points for joining!
> http://clickhere.egroups.com/click/805
>
>
> eGroups.com home: http://www.egroups.com/group/framescript-users
> http://www.egroups.com - Simplifying group communications
>
>
>
>
>
Hi all,
I have a document that have some set of Bulleted List and Second
Bulleted List.
But my problem here is that in each set of Bulleted list I have to
change the
style of the last bulleted on the list to "BULLETED LAST" Style.
Some body have idea how I can find the last Bulleted list on the set
and apply style "BULLETED LIST" on my Document.
Thank you for you help.
Carlos
I'm downloading and trying it right away. Thanks so much.
Nancy McCoy
docuprose
909-738-9332
> -----Original Message-----
> From: Philip Sharman [mailto:psharman@...]
> Sent: Tuesday, September 07, 1999 2:12 PM
> To: framescript-users@egroups.com
> Subject: [framescript-users] Re: FrameScript editor
>
>
> At 01:17 PM 99/09/07 -0700, someone wrote:
> >How do you all out there edit your longer script files?
>
> I use the shareware text editor UltraEdit
> <http://www.ultraedit.com/index.html>. The thing that I like
> about it (and
> the thing that prompted me to send in my $) is the fact that you
> can get it
> to color your FrameScripts with nice syntax coloring. (IE, it shows
> comments in one color, keywords in another, stings in another, etc.).
>
> On <http://www.cadvision.com/sharmanp/FrameScript.htm>I have a
> file called
> "wordfile.txt". Replace the one that comes with UltraEdit with this one,
> and presto! (I can't remember where I got the original file from. It was
> on somebody's web site somewhere. I tweaked it a bit to suit my
> taste, but
> the bulk of the work was done by somebody else.)
>
> Regards,
> Philip.
>
>
>
> ------------------------------------------------------------------------
> MyPoints-Free Rewards When You're Online.
> Start with up to 150 Points for joining!
> http://clickhere.egroups.com/click/805
>
>
> eGroups.com home: http://www.egroups.com/group/framescript-users
> http://www.egroups.com - Simplifying group communications
>
>
>
>
>
At 01:17 PM 99/09/07 -0700, someone wrote:
>How do you all out there edit your longer script files?
I use the shareware text editor UltraEdit
<http://www.ultraedit.com/index.html>. The thing that I like about it (and
the thing that prompted me to send in my $) is the fact that you can get it
to color your FrameScripts with nice syntax coloring. (IE, it shows
comments in one color, keywords in another, stings in another, etc.).
On <http://www.cadvision.com/sharmanp/FrameScript.htm>I have a file called
"wordfile.txt". Replace the one that comes with UltraEdit with this one,
and presto! (I can't remember where I got the original file from. It was
on somebody's web site somewhere. I tweaked it a bit to suit my taste, but
the bulk of the work was done by somebody else.)
Regards,
Philip.
Is it too obvious that I'm excited about this new news group?
I find the script editing window within FrameMaker to be a bit
restrictive, especially for longer scripts. There is no search
capability and manuervering in general, is a bother.
I tried using notepad and created spaces in a script using the tab key.
When I opened it from within FrameMaker, that appeared to be a no-no. I
had to go in and remove all the tabs. How do you all out there edit
your longer script files? And besides the use of subroutines, which
must appear in the same script, is there any way to separate script
functionality into physically separate scripts.
TIA
Nancy McCoy
Consultant
docuprose@...
I am not sure, but here is my guess. Perhaps the "sautoupd 1Numbered" is a
"1Numbered" format that had some kind of an local formatting override
applied to it in Word. Maybe the Frame import filter gives it a unique name
so that you know that the paragraph did not match the default specification
for "1Numbered." Go back to the Word file and check to see if there is any
local formatting applied to that paragraph.
Rick Quatro
Carmen Publishing
716 659-8267
frameexpert@...
FrameScript Information at http://www.mindspring.com/~frameexpert
> Hi fellow scripters:
>
> I create a document in Word using structured styles.
> I save it as an RTF file.
> I use FrameMaker to open and convert the RTF file.
> I import a Frame doc with matching tags. Of course there's lots of
> manual fixes that must be made.
> I am using Framescript to automate these fixes.
> As I loop through the paragragh objects in the converted RTF file, I
> find
> 1. A lot of additional tags that I hadn't defined in the Word OR Frame
> file.
> 2. Some tags have a sautoupd label attached. For example, 1Numbered
> becomes "sautoupd 1Numbered".
>
> Of course, I can ignore and script around these annoyances, but I would
> like to understand them.
Hi fellow scripters:
I create a document in Word using structured styles.
I save it as an RTF file.
I use FrameMaker to open and convert the RTF file.
I import a Frame doc with matching tags. Of course there's lots of
manual fixes that must be made.
I am using Framescript to automate these fixes.
As I loop through the paragragh objects in the converted RTF file, I
find
1. A lot of additional tags that I hadn't defined in the Word OR Frame
file.
2. Some tags have a sautoupd label attached. For example, 1Numbered
becomes "sautoupd 1Numbered".
Of course, I can ignore and script around these annoyances, but I would
like to understand them.
Thanks for all your help. It works perfectly.
Jen
-----Original Message-----
From: Rick Quatro [mailto:frameexpert@...]
Sent: Wednesday, September 01, 1999 1:57 PM
To: framescript-users@egroups.com
Subject: [framescript-users] Re: Loop ForEach question
Hi Jen,
Your script is counting character formats in the active document with the
name "class name"; and of course, there is only one character format with
that name in the document. You actually want to count how many times "class
name" is applied to text in your document. Here is how to do it:
Set Count = 0; // Set the counter to 0
// Make a loop to check each paragraph in the active document
Loop ForEach(Pgf) In(ActiveDoc) LoopVar(vPgf)
// Test for character property changes within the current paragraph.
Get TextList InObject(vPgf) NewVar(vTList) CharPropsChange;
If vTList.Size > 0
// If there are character property changes, test each one with a loop.
Loop While(vCounter <= vTList.Size) LoopVar(vCounter) Init(1) Incr(1)
Get Member Number(vCounter) From(vTList) NewVar(vPropChange);
// For each property change, you must make a text location variable,
// so that you can get the text properties at that location.
New TextLoc NewVar(vTextLoc) Object(vPgf)
Offset(vPropChange.TextOffset);
Get TextProperties TextLoc(vTextLoc) NewVar(vTProps);
// Here is the test for the character tag.
If vTProps.CharTag = 'class name'
Set Count = Count+1;
EndIf
EndLoop
EndIf
EndLoop
// Display the message box.
MsgBox 'The number of words with class name formatting is '+Count;
Note: This script does not test text lines or equations. Also, it tests
every paragraph in the document, including those on master pages and
references pages. If you have any questions, please let me know.
Rick Quatro
Carmen Publishing
716 659-8267
frameexpert@...
FrameScript Information at http://www.mindspring.com/~frameexpert
> Hi All:
>
> I'm the process of learning Framescript and was wondering if anyone could
> help me troubleshoot this script:
>
>
> Set Count = 0;
> Loop ForEach (CharFmt) In(ActiveDoc) LoopVar(chobj)
> if chobj.CharTag = 'class name'
> set count = count + 1;
> EndIf
> EndLoop
>
> MsgBox 'The number of words with class name formatting is '+count;
>
>
> For some reason, I keep getting returned the number 1. Help! I have about
20
> instances of 'class name' formatting in the activedoc so I know I'm doing
> something wrong.
>
------------------------------------------------------------------------
MyPoints-Free Rewards When You're Online.
Start with up to 150 Points for joining!
http://clickhere.egroups.com/click/805
eGroups.com home: http://www.egroups.com/group/framescript-usershttp://www.egroups.com - Simplifying group communications
Hi All:
I'm the process of learning Framescript and was wondering if anyone could
help me troubleshoot this script:
Set Count = 0;
Loop ForEach (CharFmt) In(ActiveDoc) LoopVar(chobj)
if chobj.CharTag = 'class name'
set count = count + 1;
EndIf
EndLoop
MsgBox 'The number of words with class name formatting is '+count;
For some reason, I keep getting returned the number 1. Help! I have about 20
instances of 'class name' formatting in the activedoc so I know I'm doing
something wrong.
Thanks in advance,
Jen
Hi Jen,
Your script is counting character formats in the active document with the
name "class name"; and of course, there is only one character format with
that name in the document. You actually want to count how many times "class
name" is applied to text in your document. Here is how to do it:
Set Count = 0; // Set the counter to 0
// Make a loop to check each paragraph in the active document
Loop ForEach(Pgf) In(ActiveDoc) LoopVar(vPgf)
// Test for character property changes within the current paragraph.
Get TextList InObject(vPgf) NewVar(vTList) CharPropsChange;
If vTList.Size > 0
// If there are character property changes, test each one with a loop.
Loop While(vCounter <= vTList.Size) LoopVar(vCounter) Init(1) Incr(1)
Get Member Number(vCounter) From(vTList) NewVar(vPropChange);
// For each property change, you must make a text location variable,
// so that you can get the text properties at that location.
New TextLoc NewVar(vTextLoc) Object(vPgf)
Offset(vPropChange.TextOffset);
Get TextProperties TextLoc(vTextLoc) NewVar(vTProps);
// Here is the test for the character tag.
If vTProps.CharTag = 'class name'
Set Count = Count+1;
EndIf
EndLoop
EndIf
EndLoop
// Display the message box.
MsgBox 'The number of words with class name formatting is '+Count;
Note: This script does not test text lines or equations. Also, it tests
every paragraph in the document, including those on master pages and
references pages. If you have any questions, please let me know.
Rick Quatro
Carmen Publishing
716 659-8267
frameexpert@...
FrameScript Information at http://www.mindspring.com/~frameexpert
> Hi All:
>
> I'm the process of learning Framescript and was wondering if anyone could
> help me troubleshoot this script:
>
>
> Set Count = 0;
> Loop ForEach (CharFmt) In(ActiveDoc) LoopVar(chobj)
> if chobj.CharTag = 'class name'
> set count = count + 1;
> EndIf
> EndLoop
>
> MsgBox 'The number of words with class name formatting is '+count;
>
>
> For some reason, I keep getting returned the number 1. Help! I have about
20
> instances of 'class name' formatting in the activedoc so I know I'm doing
> something wrong.
>
Sorry I omitted that Lypptek, I am referring to FrameScript variables.
I think that was part of my problem....the Framescript reference manual
has a section on variable (and varfmt) objects that I was assuming(in
error) referred to Framescript variables.
Thank you all for your responses.
docupros-@... wrote:
original article:http://www.egroups.com/group/framescript-users/?start=
15
> Nancy,
>
> When you say "variable", are you talking about Frame variables
> or FrameScript variables?
>
> Lypptek
>
>
> -----Original Message-----
> From: Rick Quatro [mailto:frameexpert@...]
> Sent: Tuesday, August 31, 1999 4:19 PM
> To: framescript-users@egroups.com
> Subject: [framescript-users] Re: renaming a variable
>
>
> Hi Nancy,
>
> To be honest with you, it is not clear to me what you are trying to
do. But,
> here is how to change the definition of a variable format with
FrameScript.
> This first example assumes that you are using a loop to find a
variable
> format with a particular definition:
>
> Loop ForEach(VarFmt) In(ActiveDoc) LoopVar(vCurrentVarFmt)
> If vCurrentVarFmt.Fmt = 'WORKSHOP_12'
> Set vCurrentVarFmt.Fmt = 'WORKSHOP_13';
> EndIf
> EndLoop
>
> If you know the variable format's name but not its current
definition, use
> this instead. This assumes that the variable name is "Workshop".
>
> Loop ForEach(VarFmt) In(ActiveDoc) LoopVar(vCurrentVarFmt)
> If vCurrentVarFmt.Name = 'Workshop'
> Set vCurrentVarFmt.Fmt = 'WORKSHOP_13';
> EndIf
> EndLoop
>
> This last version is probably preferrable, because you don't have to
know
> its current definition to change it, only its name.
>
> Rick Quatro
> Carmen Publishing
> 716 659-8267
> frameexpert@...
> FrameScript Information at http://www.mindspring.com/~frameexpert
>
>
> > Hi Rick:
> > Thanks for your response.
> > It occurred to me that the best way to handle this may be with an
array of
> > Workshops rather than renaming the variable....What do you think,
and is
> it
> > clear to you what I'm trying to do?
> > Nancy McCoy
> > docuprose@...
> >
> > >
> > > Nancy,
> > >
> > > I am sorry for the delay in answering you. Did you get an answer
yet? If
> > > not, let me know, and I will give you a solution. Thanks.
> > >
> > > Rick Quatro
> > > Carmen Publishing
> > > 716 659-8267
> > > frameexpert@...
> > > FrameScript Information at http://www.mindspring.com/~frameexpert
> > >
> > > > Hi all:
> > > > Can anyone describe in general terms how to rename a variable
on the
> > > > fly?
> > > >
> > > > For example:
> > > >
> > > > I may have a variable WORKSHOP_12 which I'd like to rename as
such:
> > > >
> > > > if WS12 = FALSE
> > > > if WS13 = TRUE
> > > > {rename WORKSHOP_12 to WORKSHOP_13};
> > > > endif
> > > > endif
> > > >
> > > > The issue here is that there can be a large number of workshops
which
> > > > would result in a huge number of if-endif statements. It would
be much
> > > > cleaner (concise)to rename the variable depending on the
condition.
> > > > TIA, Nancy
> > >
> > >
> > >
> > > -----------------------------------------------------------------
-------
> > >
> > > eGroups.com home: http://www.egroups.com/group/framescript-users
> > > http://www.egroups.com - Simplifying group communications
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > -------------------------------------------------------------------
-----
> >
> > eGroups.com home: http://www.egroups.com/group/framescript-users
> > http://www.egroups.com - Simplifying group communications
> >
> >
> >
> >
>
>
Nancy,
When you say "variable", are you talking about Frame variables
or FrameScript variables?
Lypptek
-----Original Message-----
From: Rick Quatro [mailto:frameexpert@...]
Sent: Tuesday, August 31, 1999 4:19 PM
To: framescript-users@egroups.com
Subject: [framescript-users] Re: renaming a variable
Hi Nancy,
To be honest with you, it is not clear to me what you are trying to do. But,
here is how to change the definition of a variable format with FrameScript.
This first example assumes that you are using a loop to find a variable
format with a particular definition:
Loop ForEach(VarFmt) In(ActiveDoc) LoopVar(vCurrentVarFmt)
If vCurrentVarFmt.Fmt = 'WORKSHOP_12'
Set vCurrentVarFmt.Fmt = 'WORKSHOP_13';
EndIf
EndLoop
If you know the variable format's name but not its current definition, use
this instead. This assumes that the variable name is "Workshop".
Loop ForEach(VarFmt) In(ActiveDoc) LoopVar(vCurrentVarFmt)
If vCurrentVarFmt.Name = 'Workshop'
Set vCurrentVarFmt.Fmt = 'WORKSHOP_13';
EndIf
EndLoop
This last version is probably preferrable, because you don't have to know
its current definition to change it, only its name.
Rick Quatro
Carmen Publishing
716 659-8267
frameexpert@...
FrameScript Information at http://www.mindspring.com/~frameexpert
> Hi Rick:
> Thanks for your response.
> It occurred to me that the best way to handle this may be with an array of
> Workshops rather than renaming the variable....What do you think, and is
it
> clear to you what I'm trying to do?
> Nancy McCoy
> docuprose@...
>
> >
> > Nancy,
> >
> > I am sorry for the delay in answering you. Did you get an answer yet? If
> > not, let me know, and I will give you a solution. Thanks.
> >
> > Rick Quatro
> > Carmen Publishing
> > 716 659-8267
> > frameexpert@...
> > FrameScript Information at http://www.mindspring.com/~frameexpert
> >
> > > Hi all:
> > > Can anyone describe in general terms how to rename a variable on the
> > > fly?
> > >
> > > For example:
> > >
> > > I may have a variable WORKSHOP_12 which I'd like to rename as such:
> > >
> > > if WS12 = FALSE
> > > if WS13 = TRUE
> > > {rename WORKSHOP_12 to WORKSHOP_13};
> > > endif
> > > endif
> > >
> > > The issue here is that there can be a large number of workshops which
> > > would result in a huge number of if-endif statements. It would be much
> > > cleaner (concise)to rename the variable depending on the condition.
> > > TIA, Nancy
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > eGroups.com home: http://www.egroups.com/group/framescript-users
> > http://www.egroups.com - Simplifying group communications
> >
> >
> >
> >
> >
>
>
>
> ------------------------------------------------------------------------
>
> eGroups.com home: http://www.egroups.com/group/framescript-users
> http://www.egroups.com - Simplifying group communications
>
>
>
>
------------------------------------------------------------------------
eGroups.com home: http://www.egroups.com/group/framescript-usershttp://www.egroups.com - Simplifying group communications
Hi Nancy,
To be honest with you, it is not clear to me what you are trying to do. But,
here is how to change the definition of a variable format with FrameScript.
This first example assumes that you are using a loop to find a variable
format with a particular definition:
Loop ForEach(VarFmt) In(ActiveDoc) LoopVar(vCurrentVarFmt)
If vCurrentVarFmt.Fmt = 'WORKSHOP_12'
Set vCurrentVarFmt.Fmt = 'WORKSHOP_13';
EndIf
EndLoop
If you know the variable format's name but not its current definition, use
this instead. This assumes that the variable name is "Workshop".
Loop ForEach(VarFmt) In(ActiveDoc) LoopVar(vCurrentVarFmt)
If vCurrentVarFmt.Name = 'Workshop'
Set vCurrentVarFmt.Fmt = 'WORKSHOP_13';
EndIf
EndLoop
This last version is probably preferrable, because you don't have to know
its current definition to change it, only its name.
Rick Quatro
Carmen Publishing
716 659-8267
frameexpert@...
FrameScript Information at http://www.mindspring.com/~frameexpert
> Hi Rick:
> Thanks for your response.
> It occurred to me that the best way to handle this may be with an array of
> Workshops rather than renaming the variable....What do you think, and is
it
> clear to you what I'm trying to do?
> Nancy McCoy
> docuprose@...
>
> >
> > Nancy,
> >
> > I am sorry for the delay in answering you. Did you get an answer yet? If
> > not, let me know, and I will give you a solution. Thanks.
> >
> > Rick Quatro
> > Carmen Publishing
> > 716 659-8267
> > frameexpert@...
> > FrameScript Information at http://www.mindspring.com/~frameexpert
> >
> > > Hi all:
> > > Can anyone describe in general terms how to rename a variable on the
> > > fly?
> > >
> > > For example:
> > >
> > > I may have a variable WORKSHOP_12 which I'd like to rename as such:
> > >
> > > if WS12 = FALSE
> > > if WS13 = TRUE
> > > {rename WORKSHOP_12 to WORKSHOP_13};
> > > endif
> > > endif
> > >
> > > The issue here is that there can be a large number of workshops which
> > > would result in a huge number of if-endif statements. It would be much
> > > cleaner (concise)to rename the variable depending on the condition.
> > > TIA, Nancy
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > eGroups.com home: http://www.egroups.com/group/framescript-users
> > http://www.egroups.com - Simplifying group communications
> >
> >
> >
> >
> >
>
>
>
> ------------------------------------------------------------------------
>
> eGroups.com home: http://www.egroups.com/group/framescript-users
> http://www.egroups.com - Simplifying group communications
>
>
>
>
Nancy,
Am I missing something, or could you not just set
new.variable = old.variable
WORKSHOP_13 = WORKSHOP_12
If you need to clean out the old variable, then you could set its value to
something outside the range you are testing for. (Off hand, I don't remember
if you can set it to 'null', or what.)
Do you have a specific need to eliminate old.variable (WORKSHOP_12)? If you
don't need to eliminate it and if its value is not in play from that point on,
then you should not need to worry about it remaining in existence.
Alternatively, perhaps you can turn the problem upside down. If you are
concerned about a big stack of if/endif, then perhaps then it is the workshop
number which needs to be variablized and then loop through those before moving
on.
Jay
--
Jay Smith
e-mail: jay@...
Jay Smith & Associates
P.O. Box 650
Snow Camp, NC 27349 USA
Phone: Int+US+336-376-9991
Toll-Free Phone in US & Canada:
1-800-447-8267
Fax: Int+US+336-376-6750
nancy mccoy wrote:
>
> Hi Rick:
> Thanks for your response.
> It occurred to me that the best way to handle this may be with an array of
> Workshops rather than renaming the variable....What do you think, and is it
> clear to you what I'm trying to do?
> Nancy McCoy
> docuprose@...
>
> > -----Original Message-----
> > From: Rick Quatro [mailto:frameexpert@...]
> > Sent: Tuesday, August 31, 1999 11:10 AM
> > To: framescript-users@egroups.com
> > Subject: [framescript-users] Re: renaming a variable
> >
> >
> > Nancy,
> >
> > I am sorry for the delay in answering you. Did you get an answer yet? If
> > not, let me know, and I will give you a solution. Thanks.
> >
> > Rick Quatro
> > Carmen Publishing
> > 716 659-8267
> > frameexpert@...
> > FrameScript Information at http://www.mindspring.com/~frameexpert
> >
> > > Hi all:
> > > Can anyone describe in general terms how to rename a variable on the
> > > fly?
> > >
> > > For example:
> > >
> > > I may have a variable WORKSHOP_12 which I'd like to rename as such:
> > >
> > > if WS12 = FALSE
> > > if WS13 = TRUE
> > > {rename WORKSHOP_12 to WORKSHOP_13};
> > > endif
> > > endif
> > >
> > > The issue here is that there can be a large number of workshops which
> > > would result in a huge number of if-endif statements. It would be much
> > > cleaner (concise)to rename the variable depending on the condition.
> > > TIA, Nancy
Harvey,
As Dan has outlined, this business is obnoxious.
If I remember correctly, your FM content is essentially a flow coming from a
proprietary data base environment. In any case, since you are having to
massage everything coming through, you should be able to get very close to the
FrameScript solution that Rick Quatro has made.
I note in your question, however, that you are not so concerned with _pairs_
of pages, but of _individual_ pages. Thus using Rick's solution might not be
what you want.
However, while *I* have not tried to do this with FrameScript myself, it would
seem to me that it would be reasonably possible to use FrameScript to cause
master page assignment for any one page, based on virtually any structural or
content element of/on a page. There may be some tedious looping involved,
but, based on the other work I have done in FrameScript, it sounds doable.
If you do do it, I would very much like a copy of the script -- I will have
something needing it coming up soon. :)
If you are not yet using FrameScript, you "should" be -- at least if you are
doing the kind of work you were planning on doing when we last communicated.
You might also want to subscribe to the FrameScript group:
eGroups.com home: http://www.egroups.com/group/framescript-usershttp://www.egroups.com - Simplifying group communications
There is not much activity yet, but one has to start somewhere.
Jay
--
Jay Smith
e-mail: jay@...
Jay Smith & Associates
P.O. Box 650
Snow Camp, NC 27349 USA
Phone: Int+US+336-376-9991
Toll-Free Phone in US & Canada:
1-800-447-8267
Fax: Int+US+336-376-6750
Dan Emory wrote:
>
> This is a major hole in FrameMaker funtionality (i.e., that it can't manage
> left/right master page pairs other than the default left/right pair). I
> believe Rick Quattro at
> "Rick Quatro" <frameexpert@...>
> has a FrameScript that will do the job, provided that:
> a. Your master page naming conventions conform to the conventions
> required by the script.
> b. The first paragraph tag on a page must be uniquely correlatable
> to a particular left/right page pair you want to use. If the first paragraph
> tag on a page does not correlate to a ltransition to a different master page
> pair, then the page would use the same master page pair as the previous
> page. Thus, if a page uses a non-default left/right master page pair, and
> the next page should revert back to the default left/right master page pair,
> a unique paragraph tag must be also be established for that case.
>
> PublishRight had a product named MPager that used a special marker type
> rather than a paragraph tag to signify a transition to a different
> left/right master page pair. It also required conformance to a master page
> naming convention. However, I think the product was sold to another company
> (a UK company as I recall), which is now marketing it. I don't remember the
> name of that company.
>
> As you can see, it gets kind of complicated, which probably explains why it
> has not yet been implemented in FrameMaker. if Adobe were to implement this
> added page management funtionality in the next FrameMaker release, the
> simplest implementation would be the one used in MPager (i.e., a special
> marker type denotes a transition to a different master page type). Such an
> implementation would still require conformance to an established master page
> naming convention of some sort, however.
>
> Note that any such master page management capability should also include a
> capability to add a named blank left-hand master page when the last text
> page in a chapter or section is a right-hand page.
> =========================================================================
> At 11:32 AM 8/31/99 -0400, harvey_greenberg@... wrote:
> >
> >
> >Is there a way to easily control application of rights and lefts for special
> >pages? The basic right and left within a template works fine. Where we have
> >special pages, though, and are not able to set them as always left or always
> >right we have to: 1) create right- and left-versions for each special page,
> and;
> >2) manually go through the chapter after all the material is composed and
fix
> >the rights that should be left and vice-versa.
> >
> ====================
> | Nullius in Verba |
> ====================
> Dan Emory, Dan Emory & Associates
> FrameMaker/FrameMaker+SGML Document Design & Database Publishing
> Voice/Fax: 949-722-8971 E-Mail: danemory@...
> 10044 Adams Ave. #208, Huntington Beach, CA 92646
> ---Subscribe to the "Free Framers" list by sending a message to
> majordomo@... with "subscribe framers" (no quotes) in the body.
>
Hi Rick:
Thanks for your response.
It occurred to me that the best way to handle this may be with an array of
Workshops rather than renaming the variable....What do you think, and is it
clear to you what I'm trying to do?
Nancy McCoy
docuprose@...
> -----Original Message-----
> From: Rick Quatro [mailto:frameexpert@...]
> Sent: Tuesday, August 31, 1999 11:10 AM
> To: framescript-users@egroups.com
> Subject: [framescript-users] Re: renaming a variable
>
>
> Nancy,
>
> I am sorry for the delay in answering you. Did you get an answer yet? If
> not, let me know, and I will give you a solution. Thanks.
>
> Rick Quatro
> Carmen Publishing
> 716 659-8267
> frameexpert@...
> FrameScript Information at http://www.mindspring.com/~frameexpert
>
> > Hi all:
> > Can anyone describe in general terms how to rename a variable on the
> > fly?
> >
> > For example:
> >
> > I may have a variable WORKSHOP_12 which I'd like to rename as such:
> >
> > if WS12 = FALSE
> > if WS13 = TRUE
> > {rename WORKSHOP_12 to WORKSHOP_13};
> > endif
> > endif
> >
> > The issue here is that there can be a large number of workshops which
> > would result in a huge number of if-endif statements. It would be much
> > cleaner (concise)to rename the variable depending on the condition.
> > TIA, Nancy
>
>
>
> ------------------------------------------------------------------------
>
> eGroups.com home: http://www.egroups.com/group/framescript-users
> http://www.egroups.com - Simplifying group communications
>
>
>
>
>
Nancy,
I am sorry for the delay in answering you. Did you get an answer yet? If
not, let me know, and I will give you a solution. Thanks.
Rick Quatro
Carmen Publishing
716 659-8267
frameexpert@...
FrameScript Information at http://www.mindspring.com/~frameexpert
> Hi all:
> Can anyone describe in general terms how to rename a variable on the
> fly?
>
> For example:
>
> I may have a variable WORKSHOP_12 which I'd like to rename as such:
>
> if WS12 = FALSE
> if WS13 = TRUE
> {rename WORKSHOP_12 to WORKSHOP_13};
> endif
> endif
>
> The issue here is that there can be a large number of workshops which
> would result in a huge number of if-endif statements. It would be much
> cleaner (concise)to rename the variable depending on the condition.
> TIA, Nancy
Hi all:
Can anyone describe in general terms how to rename a variable on the
fly?
For example:
I may have a variable WORKSHOP_12 which I'd like to rename as such:
if WS12 = FALSE
if WS13 = TRUE
{rename WORKSHOP_12 to WORKSHOP_13};
endif
endif
The issue here is that there can be a large number of workshops which
would result in a huge number of if-endif statements. It would be much
cleaner (concise)to rename the variable depending on the condition.
TIA, Nancy
Book Shell This is a utility script designed to make it easy to process each file of a book. (The aim is to put all the file-opening and file-closing stuff in one place, rather than rewriting it in every script that needs it.)
There are two parts:
1._BookShell is the script that does the work of opening and closing the files. (It is not designed to be run directly; it should be called by a parent script, such as BookShellTest .)
2.BookShellTest provides an example of how to call and use _BookShell . This parent script does the work of processing each file. (You'll have to change the path in line 18 to point to the location where you have _BookShell .)
How It Works:
The parent script calls _BookShell and provides it with the name a subroutine (located in the parent script). _BookShell then:
1.Opens each file in the book (if it is not already open).
2.Calls the parent's subroutine (passing it the file's full path and filename and information about the file's type).
3.Closes the file (if it wasn't open when it started).
The parent script can:
- process each file the same way, and/or
- do special processing based on the filename, and/or
- do special processing based on the file's type (e.g., Table Of Contents, Index, etc.).
These scripts also illustrate how to use FrameScript's "callback" feature.
eGroups has two types of digests to choose from:
Full digest- Which is e-mailed once a day, and consists of the full
message bodies of all the messages posted to that group in 24
hours. Summary digest- If you choose daily summary digest, you'll
only receive the message subject and author in the e-mail. To
read those message. Simply click on the links included in the
summary message and it will take you to the group message page.
To set your subscription to receive digest:
1.Login at www.egroups.com
2.Click on the "My Space" button (red/center of page)
3.Click on the group which you want to digest or other type of delivery mode
4.Click on the "Modify Subscription button"
5.Select the desired delivery mode and you're done!
----------------------------------------------------------------------------
---------------------------------
(This, and other useful information about using eGroups, can be found at
<http://www.egroups.com/info/help/main.html>.)
Regards,
Philip.
The low-down is that Framescript does not control the print setup dialog,
because it is outside Framescript's scope. So it cannot be used to control the
paper tray, the printer name, the page orientation and stuff like that.
Another limitation, not related to the print setup, to be wary of is the length
of a string literal (the bit between single quotes). Most versions of
FrameScript running around have a 99-character limit when reading a literal
before it simply lops off characters; the latest version just released or soon
to be released has increased this to 599 characters (which is better if are used
to reading in long strings). This limitation is not discussed in the manual, so
beware.
Greg,
I don't think that you can do it -- my understanding is... because that is a
Windows function and not a FrameMaker function; and FrameScript only runs
inside of FrameMaker.
However, if you get an answer that is not posted to the group, please do post
it.
Jay
Greg Cunneen wrote:
>
> Does anyone know how to set the paper tray in the printer setup dialog box
using FrameScript? I can set the paper size properties for the document, but
they don't seem to do anything.
>
> Thanks.
>
--
Jay Smith
e-mail: jay@...
Jay Smith & Associates
P.O. Box 650
Snow Camp, NC 27349 USA
Phone: Int+US+336-376-9991
Toll-Free Phone in US & Canada:
1-800-447-8267
Fax: Int+US+336-376-6750
Does anyone know how to set the paper tray in the printer setup dialog box using
FrameScript? I can set the paper size properties for the document, but they
don't seem to do anything.
Thanks.