「含んでいるフォルダを開く」の版間の差分
ナビゲーションに移動
検索に移動
セクションの修正 |
SyntaxHighlightにcopyの追加 |
||
| (同じ利用者による、間の4版が非表示) | |||
| 1行目: | 1行目: | ||
== 概要 == | == 概要 == | ||
開いているドキュメントがあるフォルダをエクスプローラで表示します。 | |||
== | VisualStudio の「含んでいるフォルダを開く」機能の模倣です。 | ||
<syntaxhighlight lang="javascript"> | |||
== ソースコード == | |||
<syntaxhighlight lang="javascript" copy> | |||
#title = "含んでいるフォルダを開く" | #title = "含んでいるフォルダを開く" | ||
// ----------------------------------------------------------------------------- | // ----------------------------------------------------------------------------- | ||
// | // 開いているドキュメントのフォルダを開きます。 | ||
// | // | ||
// Copyright (c) ks. All Rights Reserved. | // Copyright (c) ks. All Rights Reserved. | ||
| 16行目: | 17行目: | ||
var doc = window.Editor.ActiveDocument; | var doc = window.Editor.ActiveDocument; | ||
if (doc.Path) { | if (doc.Path) { | ||
var shell = new ActiveXObject("WScript.Shell"); | |||
shell.Run("rundll32.exe url.dll FileProtocolHandler \"" + doc.Path + "\""); | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
2025年6月30日 (月) 00:19時点における最新版
概要[編集]
開いているドキュメントがあるフォルダをエクスプローラで表示します。
VisualStudio の「含んでいるフォルダを開く」機能の模倣です。
ソースコード[編集]
#title = "含んでいるフォルダを開く"
// -----------------------------------------------------------------------------
// 開いているドキュメントのフォルダを開きます。
//
// Copyright (c) ks. All Rights Reserved.
// www: http://merysmacro.seesaa.net/
// -----------------------------------------------------------------------------
var doc = window.Editor.ActiveDocument;
if (doc.Path) {
var shell = new ActiveXObject("WScript.Shell");
shell.Run("rundll32.exe url.dll FileProtocolHandler \"" + doc.Path + "\"");
}
スポンサーリンク