「昇順で並び替え」の版間の差分
ナビゲーションに移動
検索に移動
注意書きの追加、見出しの追加 |
→ソースコード: 省略された波括弧の追加 |
||
| 13行目: | 13行目: | ||
// ----------------------------------------------------------------------------- | // ----------------------------------------------------------------------------- | ||
if (document.selection.Text == "") | if (document.selection.Text == "") { | ||
document.selection.SelectAll(); | document.selection.SelectAll(); | ||
} | |||
document.selection.Text = document.selection.Text.split("\n").sort().join("\n"); | document.selection.Text = document.selection.Text.split("\n").sort().join("\n"); | ||
document.selection.StartOfDocument(); | document.selection.StartOfDocument(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
2023年10月20日 (金) 14:33時点における版
このマクロはMeryのMacrosフォルダに同梱されています。
概要
編集中の文書の行を昇順で並べ替えます。
ソースコード
// -----------------------------------------------------------------------------
// 昇順で並べ替え
//
// Copyright (c) Kuro. All Rights Reserved.
// www: https://www.haijin-boys.com/
// -----------------------------------------------------------------------------
if (document.selection.Text == "") {
document.selection.SelectAll();
}
document.selection.Text = document.selection.Text.split("\n").sort().join("\n");
document.selection.StartOfDocument();
スポンサーリンク