Diff差分のブロック単位移動
- ページ: Macro/投稿
- 作者: maru
- カテゴリー: vbs
- 投稿日: 2006-02-22 (水) 00:13:30
メッセージ
差分行が何行も連続しているとき、何回も「次の差分へ移動」しないといけなくて大変です。このマクロでは、連続した差分行を飛ばして次の差分の先頭に移動します。
- 次の差分へ
0
1
2
3
4
5
6
| | Do
lngBefore = ExpandParameter("$y")
DiffNext()
Loop While CLng(lngBefore) + 1 = CLng(ExpandParameter("$y"))
|
- 前の差分
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| | Call Main
Sub Main
lngBefore = ExpandParameter("$y")
DiffPrev()
If CLng(lngBefore) = CLng(ExpandParameter("$y")) Then Exit Sub
Do While (1)
lngBefore = ExpandParameter("$y")
DiffPrev()
Select Case CLng(ExpandParameter("$y"))
Case CLng(lngBefore)
Exit Sub
Case CLng(lngBefore) - 1
Case Else
DiffNext()
Exit Do
End Select
Loop
End Sub
|