I got these three script, their work very well, but not in the cell, can you fix it:
Script 1:
00.// left Indent: whatever, firstLineIndent: 8 mm
01.
02.var curDoc = app.activeDocument;
03.
04.if ( !app.selection.length ) {
05. var paras = curDoc.stories.everyItem().paragraphs;
06.}
07.else if(app.selection.length == 1 && app.selection[0].hasOwnProperty( “baseline” )) {
08. var paras = app.selection[0].paragraphs;
09.}
10.else {
11. alert(“Something wrong with your selection!”);
12. exit();
13.}
14.
15.paras.everyItem().firstLineIndent = “8mm”;
Script 2:
01.// left Indent: whatever, firstLineIndent: 0
02.
03.var curDoc = app.activeDocument;
04.
05.if ( !app.selection.length ) {
06. var paras = curDoc.stories.everyItem().paragraphs;
07.}
08.else if(app.selection.length == 1 && app.selection[0].hasOwnProperty( “baseline” )) {
09. var paras = app.selection[0].paragraphs;
10.}
11.else {
12. alert(“Something wrong with your selection!”);
13. exit();
14.}
15.
16.paras.everyItem().firstLineIndent = “0mm”;
Script 3:
01.// left Indent: 8 mm, firstLineIndent: -8 mm
02.
03.var curDoc = app.activeDocument;
04.
05.if ( !app.selection.length ) {
06. var paras = curDoc.stories.everyItem().paragraphs;
07.}
08.else if(app.selection.length == 1 && app.selection[0].hasOwnProperty( “baseline” )) {
09. var paras = app.selection[0].paragraphs;
10.}
11.else {
12. alert(“Something wrong with your selection!”);
13. exit();
14.}
15.
16.for ( var i = 0; i < paras.length; i ++ ) {
17. var curPara = paras[i];
18. if ( curPara.leftIndent == 0 ) {
19. curPara.leftIndent = “8mm”;
20. }
21. curPara.firstLineIndent = “-8mm”;
22.}