Hallo Rainer,
ich kann alle Deine Beobachtungen bestätigen. Das Einfrieren wollte mir zunächst nicht "gelingen". Aber dann entfernt ich das Leerzeichen zu Beginn der ersten Zeile und prompt reagiert XPress nicht mehr.
Mit einer früheren Version – ich glaube es war QXP 6 – erlebte ich das Einfrieren mit einem Script, welches in der Vorgängerversion gut funktioniert hatte. Abhilfe damals war, auch die story einzubeziehen:
---
tell document 1 of application "QuarkXPress"
tell text box 1
tell story 1
count words
end tell
end tell
end tell
---
Aber im vorliegenden Fall hilft das nicht.
Eine andere Idee:
---
tell document 1 of application "QuarkXPress"
tell text box 1
set storyOne to story 1
set nWords to my countWords(storyOne)
end tell
end tell
on countWords(storyOne)
return count words of storyOne
end countWords
---
So verfälscht der führende Leerraum das Ergebnis nicht mehr. Und – noch schöner – XPress muss nicht zwangsbeendet werden.
Ich hoffe, Du kannst dies bestätigen.
Gruss, Hans
als Antwort auf: [#422945]