On 12/02/2008, Andrew Douglas Pitonyak <[EMAIL PROTECTED]> wrote:
>
> I helped Daniel with this macro. The macro calculates:
>
> Fog Index
> Flesch Reading Scale
> Flesch-Kincaid Index
> Coleman-Liau Grade
>
> It ignores all paragraphs that are not of the style:
>
> "First paragraph", "Text body", "Standard"
>
> Just so you know. This can be confusing and cause unexpected results.
>
> Paul wrote:


<snip>

>>
> >>
> >
> > I remember some time ago Daniel Carrera wrote a macro that provided
> > readability stats... This one can be found here:
> > http://www.ooomacros.org/user.php#111318
> >
> > I've only used it some time ago and I'm unsure if it actually uses the
> Fogg
> > index.
> >


<snip>


Hmmm. Is there any documentation? I'm having trouble with the macro:

I'm running OOo 2.2 on Win XP Pro. I downloaded and installed the macro in
my "default macro library". I create and save a Writer .odt file with all
paragraphs in "Text body" style. I then tried two different things:

1. Run the macro "Analyse text". I get the following error message:
==== begin error message ===
A Scripting Framework error occurred while running the Basic script
Readability.Readability.AnalyzeText.

Message: wrong number of parameters!
      [OK}
==== end error message ===

2. After closing and re-opening the document I ran the "initialise" macro
within the Readability module. I get the following error message:
==== begin error message ===
BASIC runtime error.
Sub-procedure or function procedure not defined.
    [OK]
==== end error message ===
There is a window displaying source code. One line is highlighted:
Dialog.getControl("WordsPerSentence").Text  =  Round(nWords / nSentences, 1)

This is within a block of code:
===== begin code ====
  If (nSentences <> 0) AND (nWords <> 0) Then
    Dialog.getControl("WordsPerSentence").Text = Round(nWords / nSentences,
1)
    Dialog.getControl("SyllablesPerWord").Text = Round(nSyllables / nWords,
2)
  End If
========= end code =====

which is itself with a subroutine named "ResultsDialog"



What am I doing wrong, please?

-- 
Harold Fuchs
London, England
Please reply *only* to [email protected]

Reply via email to