|
"/*"から"*/"までを選択
- ページ: Macro/投稿
- 作者: しみづ?
- カテゴリー: js
- 投稿日: 2004-01-27 (火) 10:01:42
メッセージ
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
| |
var inp = " ";
var type = " ";
var last = 99;
var i = 0;
var tmp = " ";
var crlf = 0;
var rc = 0;
Editor.MoveHistSet();
Editor.GoFileEnd();
last = Number(Editor.ExpandParameter("$y")); Editor.MoveHistPrev();
for ( ; ; ) { Editor.Left_Sel();
inp = Editor.GetSelectedString(0);
tmp = inp.substr(0, 1); if ( -1 != tmp.indexOf("*", 0) ) { type = "*";
}
else if ( -1 != tmp.indexOf("/", 0) ) { if ( type == "*" ) {
type = "/";
break;
}
}
else {
type = " ";
}
if ( 1 == Number(Editor.ExpandParameter("$y")) ) break;
}
if ( type == " " ) { Editor.MoveHistPrev();
}
else { Editor.Left(); for ( i=0; ;i++ ) { Editor.Right_Sel();
inp = Editor.GetSelectedString(0);
tmp = inp.substr(i, 1); if ( -1 != tmp.indexOf("\n", 0) ) { i++;
tmp = inp.substr(i, 1);
}
if ( -1 != tmp.indexOf("*", 0) ) { type = "*";
}
else if ( -1 != tmp.indexOf("/", 0) ) { if ( type == "*" )
break;
}
else {
type = " ";
}
if ( Number(Editor.ExpandParameter("$y")) >= last ) { Editor.Left();
break;
}
}
}
|
|
|