I'm interested in more info on this very old post. Is Thomas Michanek on this
list or does somebody have an updated URL?
This isn't valid anymore:
http://w1.184.telia.com/~u18407300/fonts/unavailable.html
--- In framescript-users@yahoogroups.com, Klaus Mueller <mueller23@...> wrote:
>
> Hello Francois,
>
> > have all missing fonts replaced automatically with a specific font
> > I couldn't find the command for this automatic replacement
>
> There's no command to automatically replace all missing fonts
> in FrameScript.
> Actually, this is a pretty complex issue that can be handled
> with different approaches.
>
> To get an insight into the complexity of the problem and possible
> solutions, Keith S. (and me, too) recommends Thomas Michanek's
> http://w1.184.telia.com/~u18407300/fonts/unavailable.html.
>
> In the most simple way, you can change the font of a specific
> object with the following routine:
>
> Set vPgf = ActiveDoc.TextSelection.Begin.Object;
> Get Member Number(vPgf.FontFamily+1) From(Session.FontFamilyNames)
> NewVar(vCurrentFontName);
> Set vNewFontName = 'Tahoma';
> Run GetFontFamily Using vFontName(vNewFontName)
> Returns vFontNum(vNewFontNum);
> If (vNewFontNum)
> Set vPgf.FontFamily = vNewFontNum;
> Write Console vCurrentFontName +' -> '+ vNewFontName;
> Else
> Write Console vNewFontName +' not available.';
> EndIf
>
> Sub GetFontFamily Using vFontName Returns vFontNum
> Set vFontNum = 0;
> Loop While(i <= Session.FontFamilyNames.Count) LoopVar(i) InitVal(1) Incr(1)
> Get Member Number(i) From(Session.FontFamilyNames) NewVar(vFName);
> If (vFName = vFontName)
> Set vFontNum = i-1;
> LeaveLoop;
> EndIf
> EndLoop
> EndSub
>
> I would not recommend to "replace automatically missing fonts" when
> opening a document.
> Anyway, you are able to get the missing (substituted) fonts within a
> EventScript:
>
> Event NoteFontSubstitution
> New String IntValue(9) NewVar(vWinTab);
> Find String(vWinTab) InString(FileName) ReturnPos(vPos);
> If (vPos)
> Get String FromString(FileName) NewVar(vUnavailableFont) EndPos(vPos-1);
> Get String FromString(FileName) NewVar(vSubstitutionFont)
StartPos(vPos+1);
> //Add Member(vUnavailableFont) To(vUnavailableFontLst);
> write console vUnavailableFont +' -> '+ vSubstitutionFont;
> EndIf
> EndEvent
>
> Note that this Event is not triggered when you open a document
> with FrameScript with activated "FontNotFoundInDoc(OK)".
> ((Note also: When using this Event, FrameMaker quits with an
> internal FM Error, when opening a MIF with missing fonts
> in text lines on reference pages.))
>
> If you want to replace missing fonts, you need to check all
> font family attributes of all objects that can contain font information.
> You can check whether the font family is available or not
> with the following routine:
>
> Set vFontNum = vObject.FontFamily+1;
> Get Member Number(vFontNum) From(Session.FontFamilyNames) NewVar(vFontName);
> Get Member Number(vFontNum) From(Session.FontFamilyAttributes)
NewVar(vFontAttr);
> If (vFontAttr < 3)
> Write Console vFontName +' is unavailable.';
> EndIf
>
> /* <RefQuote>
> Session.FontFamilyAttributes (Read-Only): IntList
> Each Integer is a packed field; the high order 16 bits indicate a surrogate
> font, and the low order bits indicate attributes for the font family.
> The flags, their mask values, and their meaning follow:
> FamilyVisible (0x00000001): Family is visible in menu.
> FamilySelectable (0x00000002): Family can be selected in menu.
> FamilyMapped (0x00000004): Family is is always mapped to another family.
> FamilySurrogate (0xFFFF0000): The family mapped to if FamilyMapped is True.
> </RefQuote> */
>
>
> Because of the difficulties detecting missing font locations
> (Table Formats, Book, etc.) it *may* (sometimes) be easier to save
> all files as MIF and replace the font names by hand (with a good
> S+R utility).
>
> Kind regards,
> Klaus
>
> ===========================================================
> itl Script Pool: Free downloads.
> http://www.itl.de/html/englisch/consulting/fsl/default.html
>
>
>
> At 22.04.2004 20:39, fmassamf wrote:
> >I am a newbie to Framescript/Elmscript.
> >
> >I am trying to write a code to have all missing fonts replaced
> >automatically with a specific font (e.g. HelveticaCE).
> >
> >
> >I couldn't find the command for this automatic replacement in the
> >documentation.
> >
> >Has anyone a suggestion?
> >
> >Thanks
> >
> >Francois
>
Thanks very much!
--- In framescript-users@yahoogroups.com, Michael Müller-Hillebrand <mmh@...>
wrote:
>
> OK, it is part of the Lib/DocUtils.fsl.
>
> The function "ForAllDocsInBook" is explained in the UsersGuide.pdf at page 69.
>
> HTH,
>
> - Michael Müller-Hillebrand
>
>
> Am 24.11.2009 um 19:54 schrieb bong_death_rabbit:
>
> > Would you mind sharing the name of the script? I looked at the names of them
yesterday and looked at their descriptions in the accompanying PDF and didn't
see anything that looked like it would do that.
> >
> >
> > Thanks
> >
> > --- In framescript-users@yahoogroups.com, Michael Müller-Hillebrand <mmh@>
wrote:
> >>
> >> Dr. Gonzo,
> >>
> >> There is an example script that ships with the plug-in, showing you exactly
how to apply a script to all components of a book.
> >>
> >> - Michael
> >>
> >> Am 24.11.2009 um 02:58 schrieb bong_death_rabbit:
> >>
> >>> I'm not clear on how to write a script that walks through all the files in
a book. I don't want to specify file names using Open Document.
> >>>
> >>> If I open all the files in the book before I run the script, what command
opens the next available file?
>
> --
> _______________________________________________________________
> Michael Müller-Hillebrand: Dokumentations-Technologie
> Adobe Certified Expert, FrameMaker
> Lösungen und Training, FrameScript, XML/XSL, Unicode
> Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747
>
OK, it is part of the Lib/DocUtils.fsl.
The function "ForAllDocsInBook" is explained in the UsersGuide.pdf at page 69.
HTH,
- Michael Müller-Hillebrand
Am 24.11.2009 um 19:54 schrieb bong_death_rabbit:
> Would you mind sharing the name of the script? I looked at the names of them
yesterday and looked at their descriptions in the accompanying PDF and didn't
see anything that looked like it would do that.
>
>
> Thanks
>
> --- In framescript-users@yahoogroups.com, Michael Müller-Hillebrand <mmh@...>
wrote:
>>
>> Dr. Gonzo,
>>
>> There is an example script that ships with the plug-in, showing you exactly
how to apply a script to all components of a book.
>>
>> - Michael
>>
>> Am 24.11.2009 um 02:58 schrieb bong_death_rabbit:
>>
>>> I'm not clear on how to write a script that walks through all the files in a
book. I don't want to specify file names using Open Document.
>>>
>>> If I open all the files in the book before I run the script, what command
opens the next available file?
--
_______________________________________________________________
Michael Müller-Hillebrand: Dokumentations-Technologie
Adobe Certified Expert, FrameMaker
Lösungen und Training, FrameScript, XML/XSL, Unicode
Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747
I seem to have solved this already. The SaveAsPDF.fsl script works the way I want and generates a single PDF file from the book files.
Thank you! Hrachya
On Wed, Nov 18, 2009 at 3:14 AM, rickrett <rickrett@...> wrote:
You can save a book file as a PDF using the "SaveFmtPdf" filetype.
Save Book BookObject(oTempBook)
File(vPDFBookName)
FileType(SaveFmtPdf);
Below are are some PDF settings you can make.Look at the FrameScript documentation for details.
~Rick
// -----------
Set oTempBook.PrintFileName = vBookNameNew;
Set oTempBook.GenerateAcrobatInfo = 1;
Set oTempBook.PrintToFile = 1;
Set oTempBook.PrintThumbnails = False;
Set oTempBook.PrintSeps = False;
Set oTempBook.PrintBlankPages = True;
Set oTempBook.PrintLastSheetFirst = False;
Set oTempBook.PrintNumCopies = 1;
Set oTempBook.PrintOddPages = True;
Set oTempBook.PrintEvenPages = True;
Set oTempBook.PrintScale = '100%';
// Set oTempBook.PDFBookmark = True; // not sure what this does
Set oTempBook.PDFBookmarksOpenLevel = PDFBookmarksOpenNoneLevel;
Set oTempBook.PDFJobOption = Print;
Set oTempBook.PDFOpenPage = 'i';
Set oTempBook.PDFZoomType = PDFZoomPage;
// The property below sets the Doc Properties "Title" and "Author"
// field (set in sub TweakBookPDFSettings)
New StringList NewVar(sPDFDocInfo);
Add Member('Title') To(sPDFDocInfo);
Add Member('This is the title') To(sPDFDocInfo);
Add Member('Author') To(sPDFDocInfo);
Add Member('I am the author') To(sPDFDocInfo);
Set oTempBook.PDFDocInfo = sPDFDocInfo;
Save Book BookObject(oTempBook) File(vPDFBookName)
FileType(SaveFmtPdf) PDFBookmark(True)
PDFDistillerAbsent(0) ModDateChanged(OK)
PDFBookmarksOpenLevel(PDFBookmarksOpenNoneLevel)
AlertUserAboutFailure(False) ReturnNativeError(vErrorCode);
--- In framescript-users@yahoogroups.com, "hrachya.aghajanyan" <hrachya.aghajanyan@...> wrote:
>
> Hi guys,
>
> Can someone help me, please. I am not that familiar with FrameScript.
> My Tcl code runs FrameScript and expects it to generate a single PDF file.
>
> I took the SaveBookAsPdf script to generate a single PDF file, thinking that it does so but now see that it generates separate PDF files for FrameMaker files in the book.
>
> Is there a way to get a single PDF file?
>
> Please advise.
> Thanks,
> Hrachya
>
> --- In framescript-users@yahoogroups.com, "hrachya.aghajanyan" <hrachya.aghajanyan@> wrote:
> >
> > Hi group,
> >
> > Is there a custom script available somewhere for taking care of referenced files in a book?
> >
> > When I use the SaveBookAsPdf.fsl from the samples directory, it generates a separate PDF file for each of the local .fm file in the book and disregards the ones that are referenced files from other source directories.
> >
> > Normally, I would expect that this script would generate a single PDF file but since no proper indication of whether a file is referenced or not is in place, it simply goes and generates separate PDF files for each file that is not referenced.
> >
> > Please advise.
> >
> > Thank you,
> > Hrachya
> >
>
Dr. Gonzo,
There is an example script that ships with the plug-in, showing you exactly how
to apply a script to all components of a book.
- Michael
Am 24.11.2009 um 02:58 schrieb bong_death_rabbit:
> I'm not clear on how to write a script that walks through all the files in a
book. I don't want to specify file names using Open Document.
>
> If I open all the files in the book before I run the script, what command
opens the next available file?
--
_______________________________________________________________
Michael Müller-Hillebrand: Dokumentations-Technologie
Adobe Certified Expert, FrameMaker
Lösungen und Training, FrameScript, XML/XSL, Unicode
Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747
gives everyone a 25% discount. Call it Anniversary Sale, call it Thanksgiving Sale, call it Black Friday sale. It is a good option especially for existing customers to upgrade to the latest version 5.x, which has the following benefits:
• Support for all versions of FrameMaker from 6 thru 9 • Ability to modify the open/save XML process • No dependence on FrameMaker license key because of separate online activation, one activation is valid for all FrameMaker installation on a single computer • Starting with 5 licenses local activation is an option • Improved documentation structure • Example scripts for new features
and if you are still using version 3.x you already missed those improvements of version 4:
• Step by step script debugger • Increased performance because of optimized script parser • Create your own dialogs
I'm not clear on how to write a script that walks through all the files in a
book. I don't want to specify file names using Open Document.
If I open all the files in the book before I run the script, what command opens
the next available file?
That's just perfect. I assumed that I had the marker objects, but just didn't know how to get the properties. Now I do! Thanks very much for your help.
Regards, Rob.
From: Rick Quatro <frameexpert@...> To: framescript-users@yahoogroups.com Sent: Fri, 20 November, 2009 12:05:47 Subject: RE: [framescript-users] Getting marker type and text from a paragraph
Hi Rob,
If vObjList[idx] .TextType= 'MarkerAnchor'
// Get the marker object.
Set oMarker = vObjList[idx] .TextData;
// Write the marker's text to the Console.
Write Console oMarker.MarkerText;
// Write the marker's type to the Console.
Write Console oMarker.MarkerTypeI d.Name;
EndIf
Rick Quatro
Carmen Publishing Inc.
585-659-8267 rick@frameexpert. com
www.frameexpert. com
Hi Rob,
If vObjList[idx].TextType='MarkerAnchor'
// Get the marker object.
Set oMarker = vObjList[idx].TextData;
// Write the marker's text to the Console.
Write Console oMarker.MarkerText;
// Write the marker's type to the Console.
Write Console oMarker.MarkerTypeId.Name;
EndIf
Rick Quatro
Carmen Publishing Inc.
585-659-8267
rick@...
www.frameexpert.com
http://www.frameexpert.com/peace/
The task I'm trying to achieve is to find the index markers in a specific paragraph in a document. The paragraph is always the first one in the document file I want to limit the search to this paragraph. I have used a Get TextList command to find the markers in the paragraph and to get the paragraph text. I can display the paragraph text just fine, but I cannot get information about the markers from the text list. Can anyone tell me how to do that please?
I'm pretty new to FrameScript and would appreciate any help with this issue. My initial workings are shown in the code fragement below. The ElseIf statement successfully gives me the paragraph's text string. It is the first part of the if statement that I cannot get to work. It is here that I'd like to be able to get the marker
type and marker text of the MarkerAnchor in the stringlist returned by the Get TextList command.
Regards, Rob Piper.
Sub IndexMarkers //Get the keyword heading from the first paragraph in the keyword file. Set vFlow = vDoc.MainFlowInDoc; Set vKwPgf = vFlow.FirstPgfInFlow;
//Get items from paragraph and try to identify what you've got. Get TextList InObject(vKwPgf) NewVar(vObjList) String MarkerAnchor; Loop LoopVar(idx) InitVal(1) Incr(1) While(idx<=vObjList.count) //How can you get the properties of the marker object from the text list? If vObjList[idx].TextType='MarkerAnchor'
The main part of the "do something here" is to get the marker type and text of the obtained marker anchor.
//This part is working and displays the keyword heading text. ElseIf vObjList[idx].TextType='String' SET
vKwHead=vObjList[idx].textdata; DISPLAY vKwHead; EndIf
There is a TblWidth property, which you can add to the TblLeftIndent
and TblRightIndent values to get the total width, including the indents. Then
you can compare this to the column width of the SubCol containing the table.
Hi all,
i have a task pending in my hand that has to check all the Tables in the in the
FM Document, whether it exceeds the page Margin, or not.
I have to get the Table left Margin, and Table Right Margin, and i have to check
whether it exceeds with the Page Left Margin and Page Right Margin.
I have got the left and right margin or the Document, by the code,
activedoc.leftmargin
activedoc.rightmargin
How do i get Table start and end point any ideas..
You can save a book file as a PDF using the "SaveFmtPdf" filetype.
Save Book BookObject(oTempBook)
File(vPDFBookName)
FileType(SaveFmtPdf);
Below are are some PDF settings you can make.Look at the FrameScript
documentation for details.
~Rick
// -----------
Set oTempBook.PrintFileName = vBookNameNew;
Set oTempBook.GenerateAcrobatInfo = 1;
Set oTempBook.PrintToFile = 1;
Set oTempBook.PrintThumbnails = False;
Set oTempBook.PrintSeps = False;
Set oTempBook.PrintBlankPages = True;
Set oTempBook.PrintLastSheetFirst = False;
Set oTempBook.PrintNumCopies = 1;
Set oTempBook.PrintOddPages = True;
Set oTempBook.PrintEvenPages = True;
Set oTempBook.PrintScale = '100%';
// Set oTempBook.PDFBookmark = True; // not sure what this does
Set oTempBook.PDFBookmarksOpenLevel = PDFBookmarksOpenNoneLevel;
Set oTempBook.PDFJobOption = Print;
Set oTempBook.PDFOpenPage = 'i';
Set oTempBook.PDFZoomType = PDFZoomPage;
// The property below sets the Doc Properties "Title" and "Author"
// field (set in sub TweakBookPDFSettings)
New StringList NewVar(sPDFDocInfo);
Add Member('Title') To(sPDFDocInfo);
Add Member('This is the title') To(sPDFDocInfo);
Add Member('Author') To(sPDFDocInfo);
Add Member('I am the author') To(sPDFDocInfo);
Set oTempBook.PDFDocInfo = sPDFDocInfo;
Save Book BookObject(oTempBook) File(vPDFBookName)
FileType(SaveFmtPdf) PDFBookmark(True)
PDFDistillerAbsent(0) ModDateChanged(OK)
PDFBookmarksOpenLevel(PDFBookmarksOpenNoneLevel)
AlertUserAboutFailure(False) ReturnNativeError(vErrorCode);
--- In framescript-users@yahoogroups.com, "hrachya.aghajanyan"
<hrachya.aghajanyan@...> wrote:
>
> Hi guys,
>
> Can someone help me, please. I am not that familiar with FrameScript.
> My Tcl code runs FrameScript and expects it to generate a single PDF file.
>
> I took the SaveBookAsPdf script to generate a single PDF file, thinking that
it does so but now see that it generates separate PDF files for FrameMaker files
in the book.
>
> Is there a way to get a single PDF file?
>
> Please advise.
> Thanks,
> Hrachya
>
> --- In framescript-users@yahoogroups.com, "hrachya.aghajanyan"
<hrachya.aghajanyan@> wrote:
> >
> > Hi group,
> >
> > Is there a custom script available somewhere for taking care of referenced
files in a book?
> >
> > When I use the SaveBookAsPdf.fsl from the samples directory, it generates a
separate PDF file for each of the local .fm file in the book and disregards the
ones that are referenced files from other source directories.
> >
> > Normally, I would expect that this script would generate a single PDF file
but since no proper indication of whether a file is referenced or not is in
place, it simply goes and generates separate PDF files for each file that is not
referenced.
> >
> > Please advise.
> >
> > Thank you,
> > Hrachya
> >
>
I use the fc code to exercise change tracking commands. You can get the
fc codes with the MenuList sample script.
Fred
--
Fred Wersan
Senior Technical Writer
VT MAK
68 Moulton St.
Cambridge, MA 02138
617-876-8085 x 124
VR-Vantage, MAK's 3D Visual Solution, is here!
Find out how it can fit your simulation at VR-Vantage.com
Hi guys,
Can someone help me, please. I am not that familiar with FrameScript.
My Tcl code runs FrameScript and expects it to generate a single PDF file.
I took the SaveBookAsPdf script to generate a single PDF file, thinking that it
does so but now see that it generates separate PDF files for FrameMaker files in
the book.
Is there a way to get a single PDF file?
Please advise.
Thanks,
Hrachya
--- In framescript-users@yahoogroups.com, "hrachya.aghajanyan"
<hrachya.aghajanyan@...> wrote:
>
> Hi group,
>
> Is there a custom script available somewhere for taking care of referenced
files in a book?
>
> When I use the SaveBookAsPdf.fsl from the samples directory, it generates a
separate PDF file for each of the local .fm file in the book and disregards the
ones that are referenced files from other source directories.
>
> Normally, I would expect that this script would generate a single PDF file but
since no proper indication of whether a file is referenced or not is in place,
it simply goes and generates separate PDF files for each file that is not
referenced.
>
> Please advise.
>
> Thank you,
> Hrachya
>
I recently downloaded Framescript and have been learning to write scripts. I'm looking for a way to change the track text edits commands for all the files in a book (in Framemaker 8). For example, I would like to apply "preview final" to all the files in a book at once. So far, I haven't been able to find any references for changing the track text edits commands.
Am 16.11.2009 um 11:39 schrieb Wim Hooghwinkel:
> Hi,
> FM9, Docbook
> Does anyone have a script available (or know of an existing script or plug in)
that automates the creation and generation of a generated list (TOC, Index) on
opening a book XML file. In the XML the needed book elements (TOC, Index etc)
are available as empty elements.
Hi Wim,
I have done that using the new structured features of FrameScript 5.x. Basically
using XSL preprocessing I add the Processing Instructions to make sure that
files are created for each generated file. I also assume that the template
already has the necessary definitions on the Reference Pages. Then, during the
opening process of the XML file, I wait until the book is complete and then
traverse the book components to set the properties of the generated files
accordingly. Updating the book is the last step... However, the solution is very
much tied to the customer’s structure. But it is possible and users quickly feel
like »Why did we ever had to set up TOCs manually?«
- Michael
--
_______________________________________________________________
Michael Müller-Hillebrand: Dokumentations-Technologie
Adobe Certified Expert, FrameMaker
Lösungen und Training, FrameScript, XML/XSL, Unicode
Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747
Does anyone have a script available (or
know of an existing script or plug in) that automates the creation and
generation of a generated list (TOC, Index) on opening a book XML file. In the XML
the needed book elements (TOC, Index etc) are available as empty elements.
From:
framescript-users@yahoogroups.com [mailto:framescript-users@yahoogroups.com] On
Behalf Of Brandon Sent: Thursday, November 12, 2009 12:03 PM To: framescript-users@yahoogroups.com Subject: [framescript-users] Setting PDF Page Layout properties
Is there any way to set a PDF's Page Layout
properties (In Acrobat, File -> Properties -> Initial View -> Page
Layout) to "Single Page" instead of "Continuous?" I can't
seem to even find the option outside of Acrobat (even in Distiller).
Is there any way to set a PDF's Page Layout properties (In Acrobat, File ->
Properties -> Initial View -> Page Layout) to "Single Page" instead of
"Continuous?" I can't seem to even find the option outside of Acrobat (even in
Distiller).
Hi all!
I am trying to create or modify an XRefFormat with
set vNewXRefAbschnNr = 'Abschnitt\ <$AbsNum>';
...
GET Object Type(XRefFmt) DocObject(vCurrentDoc) Name('AbschnNr')
NewVar(vXRefAbschnNr);
if vXRefAbschnNr = 0
New XRefFormat Name('AbschnNr') DocObject(vCurrentDoc)
NewVar(vXRefAbschnNr);
endif
set vXRefAbschnNr.fmt = vNewXRefAbschnNr;
In principle everything works fine, it even looks in Frame in the CrossRef
window as specified. However, in the text only "Abschnitt <$AbsNum" appears. If
I confirm the entry in the CrossRef window and update all cross-references, the
text changes to "Abschnitt 3.1" as it should be. So it seems, the closing angled
bracket is not transferred properly, although it is displayed in the CrossRef
window. Anyone had this problem or knows a workaround?
I use FM 9.0.3 and ElmScript 5.2 P231
Thanks
Werner
I've never used anything but stringlists, but I want to store all selected files
in all open books.
Lets say I have a ecollection built like below. I want to search it to see if
"File22" exists in "Book2". How do I do that?? My little findmember statement
below creates an error.
New ECollection NewVar(vFileStructure);
Set vFileStructure['Book1'] = 'File11', 'File12', 'File13';
Set vFileStructure['Book2'] = 'File21', 'File22';
Set vFileStructure['Book3'] = 'File31', 'File32', 'File33', 'File34';
// Searching for members
Set gvMember = vFileStructure['Book2'].FindMember{'File22'};
display '!! '+gvMember.value;
I tried isolating it as well, and I didn’t get the
crash. I also tried stepping through the script in debug, and it didn’t
crash the first few times through the loop. I suspect there is something
later in the file that is throwing it off. Maybe there are some strange
characters somewhere that it doesn’t know how to interpret.
BW
Benjie
Wolicki Senior Information Developer
Service Automation, ESM
BMC Software, Inc.
From:
framescript-users@yahoogroups.com [mailto:framescript-users@yahoogroups.com] On
Behalf Of Rick Quatro Sent: Tuesday, November 10, 2009 2:47 PM To: framescript-users@yahoogroups.com Subject: RE: [framescript-users] NoCase option in String Compare
Hi Benjie,
I don't get the crash when I isolate the eStr.Compare function:
Set vIsGreater = eStr.Compare{'0', 'A', 'NoCase'};
Display vIsGreater;
I would check it this way, because there may be something else in your
script causing the crash. Otherwise, you may need to upgrade to the latest
version of FrameScript, which is 5.2R1p228.
Rick Quatro
Carmen Publishing Inc.
585-659-8267 rick@...
www.frameexpert.com
Hi Benjie,
I don't get the crash when I isolate the eStr.Compare function:
Set vIsGreater = eStr.Compare{'0', 'A', 'NoCase'};
Display vIsGreater;
I would check it this way, because there may be something else in your
script causing the crash. Otherwise, you may need to upgrade to the latest
version of FrameScript, which is 5.2R1p228.
Rick Quatro
Carmen Publishing Inc.
585-659-8267
rick@...
www.frameexpert.com
I’m using version 4.1. The following is code from my
script. Without the NoCase option in the eStr.Compare, it runs fine. With
NoCase, it crashes.
set vSortComplete = 0;
loop Until (vSortComplete)
Set vSortComplete = 1;
set vpgf = vDoc.mainflowindoc.firstpgfinflow
loop while (vpgf)
if vpgf.name = 'H1'
set vpgf2 = vpgf.nextpgfinflow;
set vH1notfound = 1;
loop while (vpgf2 and
vH1notfound)
if vpgf2.name = 'H1'
set
vH1notfound = 0;
else
set vpgf2
= vpgf2.nextpgfinflow;
endif
endloop
Set vIsGreater =
eStr.Compare{vpgf.text, vpgf2.text, ‘NoCase’};
If (vpgf2 and (vIsGreater >
0))
Set vSortComplete =
0;
set vpgf3 =
vpgf2.nextpgfinflow;
set vH1notfound
= 1;
loop while (vpgf3 and
vH1notfound)
if
vpgf3.name = 'H1'
set vH1notfound = 0;
else
set vpgf3 = vpgf3.nextpgfinflow;
endif
endloop
If vH1notfound
New
textrange Newvar(vText) Object(vPgf2) Offset(0) Object(vDoc.lastpgfinmainflow)
Offset(vDoc.lastpgfinmainflow.textrange.endoffset);
else
New
textrange Newvar(vText) Object(vPgf2) Offset(0) Object(vpgf3.prevpgfinflow)
Offset(vpgf3.prevpgfinflow.textrange.endoffset);
endif
New textrange
Newvar(vNewLoc) Object(vPgf) offset(0) Offset(0);
set textselection =
vtext;
Cut Text;
set textselection =
vNewLoc;
Paste Text
Endif
endif
set vpgf = vpgf.nextpgfinflow;
endloop
endloop
From:
framescript-users@yahoogroups.com [mailto:framescript-users@yahoogroups.com] On
Behalf Of Rick Quatro Sent: Tuesday, November 10, 2009 2:00 PM To: framescript-users@yahoogroups.com Subject: RE: [framescript-users] NoCase option in String Compare
Hi Benjie,
Can you give an example of some code that causes the crash? Also, what
version of FrameScript are you using? Thanks.
Rick Quatro
Carmen Publishing Inc.
585-659-8267 rick@...
www.frameexpert.com
Hi Benjie,
Can you give an example of some code that causes the crash? Also, what
version of FrameScript are you using? Thanks.
Rick Quatro
Carmen Publishing Inc.
585-659-8267
rick@...
www.frameexpert.com
I’m trying to use the eStr.Compare function. It
works fine except for the fact that it assumes that all capital letters come
before all lower case letters (e.g. ‘B’ comes before ‘a’).
According to the documentation there is a ‘NoCase’ option, but when
I try to use it, FrameMaker crashes.
Has anyone encountered this problem? Do you know how
to get around it?
Thanx,
Benjie Wolicki
Senior Information Developer
Service Automation, ESM
BMC Software
I would
suggest rather than attempting to process the data in your dialog and
setting activebook directly, go through your dialog and make an EVector
list of the selected files in the dialog.
THEN use a loop to dereference the objects in EVector and set the
activebook for each object in turn.
Simon
cwillardr wrote:
Â
ok, smart FrameScripters...
I'm working on a multi-book printing script. The script is supposed to
print any open books in the session.
I have a modeless dialog box pop up asking the user to select what
files to print in each of the open books, and when they're done, click
and ebutton called "START". Manually, you can select files in mutiple
books and it keeps the selections.
FrameScript loses the selections though. For the most simple test, I
tried:
Set activebook = session.firstopenbook;
Set activebook = activebook.NextOpenBookInSession;
Both books lose the selections.
Any idea how to keep the selections or detect which files are selected
(so I can load them in a stringlist or something)? Maybe a F-code...