Can you make better use of all paragraph styles of document instead of paragraph styles of document, which should access styles independent of groups? You would have to give over using the name as a reference (probably wise in any case) and use the style itself (in your Find/Change).
Thanks for your advice - using the id meant that I didn't need to specify whether or not the paragraph style was in a group. I've posted the amended script below, which works a treat.
property myTypeReport : "" -- makes it available everywhere
set myTypeReport to "" -- prevents the report becoming accumulative when running repeatedly
tell application "Adobe InDesign CS5"
set myDocument to document 1
set unusedStyles to ""
set myFoundItems to ""
set myDescription to "Unused paragraph styles"
set myParagraphStyles to all paragraph styles of myDocument
repeat with i from 3 to (count of myParagraphStyles)
set myStyle to item i of myParagraphStyles
set find text preferences to nothing
set change text preferences to nothing
set applied paragraph style of find text preferences to myStyle
set myFoundItems to find text
if (count myFoundItems) = 0 then set unusedStyles to (unusedStyles + 1)
set myReport to "(" & unusedStyles & ")" & "\t\t" & myDescription
if (count unusedStyles) > 0 then set myTypeReport to myTypeReport & myReport & return
Message was edited by: Divster