[GastForen Programme Print/Bildbearbeitung Adobe InDesign

  • Suche
  • Hilfe
  • Lesezeichen
  • Benutzerliste

Anzahl der Zeichen in einem Textfeld?

Lukas M.
Beiträge gesamt: 301

9. Jul 2003, 11:55
Bewertung:

gelesen: 3861

Beitrag als Lesezeichen
TextCounter für Mac ist ein AppleScript und sieht so aus:

<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 "Please select a story or range of text for which you want a word count before running this script."
  return
 end try
 activate
 display dialog ((count of words of theSel) as string) & " words" & return & ((count of characters of theSel) as string) & " characters"
end tell

</code>

Ist nicht von mir, sondern von hier: http://tinyurl.com/gesg

--
Lukas | http://www.machata.ch

(Dieser Beitrag wurde von Lukas M. am 9. Jul 2003, 11:58 geändert)
Dieser Beitrag wurde nicht geändert.