Egal wo's steht, damit kriegst Du's ersetzt:
-- FormatNamenWechsler.as
--
set myAltSprach to (text returned of (display dialog "alter Sprachteil: " default answer "DEU"))
set myNeuSprach to (text returned of (display dialog "neuer Sprachteil: " default answer "FRA"))
set oldDelimiters to AppleScript's text item delimiters
tell application "InDesign CS"
set myDoc to active document
set myStyles to paragraph styles of myDoc whose name is not "[No Paragraph Style]"
repeat with myCounter from 1 to (count of myStyles)
set name of item myCounter of myStyles to my convertName(name of item myCounter of myStyles, myAltSprach, myNeuSprach)
end repeat
end tell
set AppleScript's text item delimiters to oldDelimiters
on convertName(myName, theOldString, theNewString)
-- alten Namensteil loeschen
set AppleScript's text item delimiters to {theOldString}
set tmpList to every text item of myName as list
-- neuen Namensteil einfügen
set AppleScript's text item delimiters to {theNewString}
set myName to tmpList as string
end convertName
--Ende FormatNamenWechsler.as
Eine Übersicht über Deine installierten Sprachen bekommst du damit angezeigt:
-- meineSprachen.as
--
tell application "InDesign CS"
set myList to "Meine Sprachen" & return & "=======" & return as list
set myLanguages to name of languages with vendors
repeat with myCounter from 1 to count of myLanguages
copy (item myCounter of myLanguages) & return to end of myList
end repeat
display dialog myList as string
end tell
-- Ende meineSprachen.as
Grüßle
Martin
als Antwort auf: [#158677]
(Dieser Beitrag wurde von MartinF am 11. Apr 2005, 22:03 geändert)