Adobe 65009333 Scripting Guide - Page 34

Text objects

Page 34 highlights

Text and Type Text objects 34 //Close the text file. myTextFile.close(); } } } } function myFindTag (myStyleName, myStyleToTagMapping){ var myTag = ""; var myDone = false; var myCounter = 0; do{ if(myStyleToTagMapping[myCounter][0] == myStyleName){ myTag = myStyleToTagMapping[myCounter][1]; break; } myCounter ++; } while((myDone == false)||(myCounter < myStyleToTagMapping.length)) return myTag; } Text objects The following diagram shows a view of InCopy's text-object model. There are two main types of text object: layout objects (text frames) and text-stream objects (stories, insertion points, characters, and words, for example). The diagram uses the natural-language terms for the objects; when you write scripts, you will use the corresponding terms from your scripting language: document story spread, page, layer insertion points characters words lines paragraphs text columns text style ranges texts notes text containers text frame insertion points characters words lines paragraphs text columns text style ranges texts notes

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88

Text and Type
Text objects
34
//Close the text file.
myTextFile.close();
}
}
}
}
function myFindTag (myStyleName, myStyleToTagMapping){
var myTag = "";
var myDone = false;
var myCounter = 0;
do{
if(myStyleToTagMapping[myCounter][0] == myStyleName){
myTag = myStyleToTagMapping[myCounter][1];
break;
}
myCounter ++;
} while((myDone == false)||(myCounter < myStyleToTagMapping.length))
return myTag;
}
Text objects
The following diagram shows a view of InCopy's text-object model. There are two main types of text
object:
layout
objects (text frames) and
text-stream
objects (stories, insertion points, characters, and words,
for example). The diagram uses the natural-language terms for the objects; when you write scripts, you will
use the corresponding terms from your scripting language:
story
insertion points
characters
words
lines
paragraphs
text columns
text style ranges
texts
text frame
insertion points
characters
words
lines
paragraphs
text columns
text style ranges
texts
text containers
document
spread, page, layer
notes
notes