Autocorrect. Adobe CS5 InDesign
विज्ञापन
विज्ञापन
C
HAPTER
6: Text and Type
Autocorrect 115
--Given a document "myDocument" with a rectangle on page 1...
set myRectangle to rectangle 1 of page 1 of myDocument tell myRectangle set myTextPath to make text path with properties {contents:"This is path text."} end tell
To link text paths to another text path or text frame, use the nextTextFrame
and previousTextFrame
properties, just as you would for a text frame (see “Working with Text Frames” on page 93
).
Autocorrect
The autocorrect feature can correct text as you type. The following script shows how to use it (for the complete script, see Autocorrect): tell auto correct preferences set autocorrect to true set auto correct capitalization errors to true
--Add a word pair to the autocorrect list. Each auto correct table
--is linked to a specific language. end tell set myAutoCorrectTable to auto correct table "English: USA"
--To safely add a word pair to the auto correct table, get the current
--word pair list, then add the new word pair to that array, and then
--set the autocorrect word pair list to the array.
set myWordPairList to {} set myWordPairList to myWordPairList & auto correct word pair list of myAutoCorrectTable
--Add a new word pair to the array.
set myWordPairList to myWordPairList & {{"paragarph", "paragraph"}}
--Update the word pair list.
set auto correct word pair list of auto correct table "English: USA" to myWordPairList
--To clear all autocorrect word pairs in the current dictionary:
--myAutoCorrectTable.autoCorrectWordPairList to {{}}
Footnotes
The following script fragment shows how to add footnotes to a story (for the complete script, including the myGetRandom
function, see Footnotes):
डाउनलोड
विज्ञापन