Welcome! 登入 註冊
美寶首頁 美寶百科 美寶論壇 美寶落格 美寶地圖

Advanced

Change History

Message: Programming of InDesign in Javascript - the duplicate method of textFrame

Changed By: RandomVariable
Change Date: August 05, 2010 10:15PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaning: ducplicate a textFrame


(2)syntax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of upper-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to as pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

myTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same position of the same page.



(b)
myPage= app.documents.add().pages[0]; //This statement is an abbreviated form of the first and second statements in the above example.
myTextFrame = myPage.textFrames.add()
myTextFrame.geometricBounds = [ 100,100,200,200] ;
myTextFrame.dupllicate( [10,20] )

In the 4-th statement, the "to" parameter is omitted, so the value [10,20] of the "by" parameters" is an absolute postion. That is, the cooridinate of the upper-left corner of the new textframe is [10,20] and the its geometricBounds is [20,10,120,110]. The page that the new textframe is placed in is the same page with that of the old textframe due to the lack of the "to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 10, 2010 05:21AM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of upupper-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to as pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

myTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same position of the same page.



(b)
myPage= app.documents.add().pages[0]; //This statement is an abbreviated form of the first and second statements in the above example.
myTextFrame = myPage.textFrames.add()
myTextFrame.geometricBounds = [ 100,100,200,200] ;
myTextFrame.dupllicate( [10,20] )

In tIn the 4-th statement, the "to" parameter is omitted, so the value [10,20] of the "by" parameters" is an absolute postion. That is, the cooridinate of upupperpper-left corner of the new textframe is [10,20] and the its geometricBounds is [20,10,120,110]. The page that the new textframe is placed in is the same page with that of the old textframe due to the lack of the "to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 10, 2010 05:20AM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to as pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

myTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same position of the same page.



(b)
myPage= app.documents.add().pages[0]; //This statement is an abbreviated form of the first and second statements in the above example.
myTextFrame = myPage.textFrames.add()
myTextFrame.geometricBounds = [ 100,100,200,200] ;
myTextFrame.dupllicate( [10,20] )

In tIn tIn the 4-th statement, the "to" parameter is omitted, so the value [10,20] of the "by" parameters" is an absolute pThis That n. That is, the cooridinate of uppper-left corner of the new textframe is [10,20] and the its geometricBounds is [20,10,120,110]. The page that the new textframe is placed in is the same page with that of the old textframe due to the lack of the "to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 10, 2010 05:19AM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to as pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

myTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same position of the same page.



(b)
myPage= app.documents.add().pages[0]; //This statement is an abbreviated form of the first and second statements in the above example.
myTextFrame = myPage.textFrames.add()
myTextFrame.geometricBounds = [ 100,100,200,200] ;
myTextFrame.dupllicate( [10,20] )

In tIn tIn the 4-th statement, the "to" parameter is omitted, so the value [10,20] of the "by" parameters" is an absolute pThis n. That is, the cooridinate of uppper-left corner of the new textframe is [10,20] and the its geometricBounds is [20,10,120,110]. The page that the new textframe is placed in is the same page with that of the old textframe due to the lack of the "to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 10:02PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

myTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same position of the same page.



(b)
myPage= app.documents.add().pages[0]; //This statement is an abbreviated form of the first and second statements in the above example.
myTextFrame = myPage.textFrames.add()
myTextFrame.geometricBounds = [ 100,100,200,200] ;
myTextFrame.dupllicate( [10,20] )

In tIn tIn tIn the 4-th statement, the "to" parameter is omitted, so the value [10,20] of the "by" parameters" is an absolute pThis n. That is, the cooridinate of uppper-left corner of the new textframe is [10,20] and the its geometricBounds is [20,10,120,110that e page that the new textframin s placed in is the same page with that of the old textframe due to the lack of the "to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 10:02PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

myTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same position of the same page.



(b)
myPage= app.documents.add().pages[0]; //This statement is an abbreviated form of the first and second statements in the above example.
myTextFrame = myPage.textFrames.add()
myTextFrame.geometricBounds = [ 100,100,200,200] ;
myTextFrame.dupllicate( [10,20] )

In tIn tIn tIn tIn the 4-th statement, the "to" parameter is omitted, so the value [10,20] of the "by" parameters" is an absolute pThis n. That is, the cooridinate of uppper-left corner of the new textframe is [10,20] and the its geometricBounds is [20,10,120,110e page that the new textframs placed in is thethat of e with that of the old textframe due to the lack of the "to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 10:01PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

myTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same position of the same page.



myPage= app.documents.add().pages[0]; //This statement is an abbreviated form of the first and second statements in the above example.
myTextFrame = myPage.textFrames.add()
myTextFrame.geometricBounds = [ 100,100,200,200] ;
myTextFrame.dupllicate( [10,20] )

In the 4-th statement, the "to" parameter is omitted, so the value [10,20] of the "by" parameters" is an absolute postion. This is, the cooridinate of the up-left corner of the new textframe is [10,20] and the its geometricBounds is [20,10,120,110]. The page the new textframe is placed is the same page with the old textframe due to the lack of the "to" parameter.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:43PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

mymyTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same positioin of the same page.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:42PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is referred to pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.
myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

mymyTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same positioin of the same page.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:42PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //When a new document is established, an empty new page in this document is created automatically. This new page is indicatreferred by to pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

mymyTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same positioin of the same page.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:40PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //Whe n a new document is established, an empty new page in this document is created automatically. This new page is indicated by pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

mymyTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same positioin of the same page.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:39PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and all both parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //Whe a new document is established, an empty new page in this document is created automatically. This new page is indicated by pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

mymyTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same positioin of the same page.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:38PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and all parameters can be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

(a)
myDoc = app.documents.add(); //"app" means the Indesign program. This statement establishs a new document in Indesign. We call this new document myDoc.
myPage = myDoc.pages[0]; //Whe a new document is established, an empty new page in this document is created automatically. This new page is indicated by pages[0] by default in Indesign object model. In this statement, we call this new page myPage.
myTextFrame = myPage.textFrames.add() //This statedment establishs a new textframe in myPage, and we call this new textframe myTetFrame.myTextFrame.geometricBounds = [ 100,100,200,200] ;
//geometricBoudns = [a , b , c, d ]
//a is the y coordinate of the up bound of the textframe.
//b is the x coordinate of the left bound of the textframe.
//c is the y coordinate of the lower bound of the textframe.
//d is the x coordinate of the right bound of the textframe.
//i.e.,the coordinate of the up-left corner of the textframe is (b,a)

myTextFrame.dupllicate() //Both parameters are omitted simultaneously, So,a textframe of the same size with the old textframe would be duplicated in the same position in the same page.


.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:24PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicate a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and all parameters can also be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:23PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicaet te a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and all parameters can also be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

.


"to" parameter.


-- to be continued -----
Changed By: RandomVariable
Change Date: March 06, 2010 09:23PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicaet a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and all parameters can also be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:

-- to be continued -----
-- to be continued -----

Original Message

作者: RandomVariable
Date: March 06, 2010 09:22PM

Programming of InDesign in Javascript - the duplicate method of textFrame
(1) meaing: ducplicaet a textFrame


(2)sytax: duplicate( to, by)
Each parameter can be omitted, and all parameters can also be omitted simultaneously.
"to" means the place you want to duplicate to. It can be spread, layer, page. That is, the spread, lay, or page you want to dulpicate to.
The meaning of "by" is a little complicated. It is a 2-tuple consisting of 2 number, like (10,20).
(a) If "to" parameter has been assigned, "by" means the relative position of the new textFrame to the old textFrame.
(b) If "to" parameter is omitted, "by" means the absolute postion of up-left corner of the new textFrame.


(3)Example:-- to be continued -----