[添付ファイル一覧]
[全ページの添付ファイル一覧]
- TransposeLine.js
- 格納ファイル名:attach/4D6163726F2FC5EAB9C62F323030_5472616E73706F73654C696E652E6A73
- ページ:Macro/投稿/200
- 格納ファイル名:attach/4D6163726F2FC5EAB9C62F323030_5472616E73706F73654C696E652E6A73
- MD5ハッシュ値:786396df7d58f5cb02b2873cdf59e7a1
- サイズ:2.6KB (2620 bytes)
- Content-type:application/octet-stream
- 登録日時:2014/02/11 06:34:48
- アクセス数:367
- MD5ハッシュ値:786396df7d58f5cb02b2873cdf59e7a1
0
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
| |
(function(){
var s = Editor.ExpandParameter("${R?r$:$:$}"); if (s == "r") return;
var y = parseInt( Editor.ExpandParameter("$y") ); if (y <= 1) return; if (y >= Editor.GetLineCount(0)) {
s = Editor.GetLineStr(y);
}
Editor.CancelMode();
var cnt = 0;
if (s.match(/[^\r\n]$/)) { var newLine = "\r\n";
var lineCode = Editor.GetLineCode();
if (lineCode == 0) {
newLine = "\r\n";
} else if (lineCode == 1) {
newLine = "\r";
} else if (lineCode == 2) {
newLine = "\n";
}
s = Editor.GetLineStr( y ) + newLine + Editor.GetLineStr( y - 1 ).replace(/[\r\n]/g, "");
cnt--;
Editor.GoLineTop(9);
Editor.Up();
Editor.GoLineTop(9);
Editor.BeginSelect();
while ( parseInt( Editor.ExpandParameter("$y") ) <= y ) {
cnt++;
Editor.GoLineEnd();
Editor.Down();
if ( parseInt( Editor.ExpandParameter("$y") ) == y ) {
cnt++;
Editor.GoLineEnd();
break;
}
}
} else {
s = Editor.GetLineStr( y ) + Editor.GetLineStr( y - 1 );
Editor.GoLineTop(9);
Editor.Up();
Editor.GoLineTop(9);
Editor.BeginSelect();
while ( parseInt( Editor.ExpandParameter("$y") ) <= y ) {
cnt++;
Editor.Down();
}
}
Editor.InsText( s );
for (var i = 0; i < cnt; i++) {
Editor.Up();
Editor.GoLineTop(9);
}
Editor.ReDraw();
})();
|