Dieser AppleScript Skript funktioniert tadellos:
<code>
-- this script counts the characters and words in the selected text
-- select a range of text with the text tool and only that range is counted
-- select a text frame or have a simple insertion point in a story
-- and all words in that story are counted.
tell application "InDesign 2.0.2"
try
set thesel to object reference of selection
if class of thesel is text frame then
set thesel to object reference of parent story of thesel
else if class of thesel is insertion point then
set thesel to object reference of parent story of parent text frame of thesel
else if class of thesel is not in {text, character} then
error
end if
on error
activate
display dialog "Wähle einen Textbereich oder einen Textrahmen eines Textabschnitts aus." with icon 2 buttons "Abbrechen" default button 1
return
end try
activate
display dialog ((count of characters of thesel) as string) & " Zeichen" & return & ((count of words of thesel) as string) & ¬
" Wörter" with icon 1 buttons "OK" default button 1
end tell
</code>
Der Originalskript ist nicht von mir, ich habe ihn jedoch "kosmetisch" ein wenig modifiziert und eingedeutscht.
--
Lukas |
http://www.machata.ch