「矩形選択範囲の各行先頭に文字挿入」の版間の差分
ページの作成:「*矩形選択後にこのマクロを実行すると、矩形選択範囲の各行先頭に文字挿入をすることができます。 *つまりサクラエディタ...」 |
編集の要約なし |
||
| 13行目: | 13行目: | ||
<source lang="javascript"> | <source lang="javascript"> | ||
#title = "矩形選択範囲の各行先頭に文字挿入" | #title = "矩形選択範囲の各行先頭に文字挿入" | ||
// ステータスバー初期化 | |||
Status = "" | |||
// 矩形選択判定 | // 矩形選択判定 | ||
var s = Document.Selection; | var s = Document.Selection; | ||
var isBoxed = (s.GetBottomPointY(mePosView) - s.GetTopPointY(mePosView)) != (s.Text.match(/\n/g) || []).length; | var isBoxed = (s.GetBottomPointY(mePosView) - s.GetTopPointY(mePosView)) != (s.Text.match(/\n/g) || []).length; | ||
if (isBoxed) { | if (isBoxed) { | ||
var Ptr = "^" ; | var Ptr = "^" ; | ||
| 26行目: | 29行目: | ||
Editor.ActiveDocument.HighlightFind = false; | Editor.ActiveDocument.HighlightFind = false; | ||
} | } | ||
} else { | |||
Status = "矩形選択がされていません。" | |||
} | } | ||
</source> | </source> | ||
スポンサーリンク