Skip to content

Instantly share code, notes, and snippets.

@masato3
Created March 26, 2025 19:14
Show Gist options
  • Save masato3/b2bb37a4e32c4e3e8dbc4f9be591153f to your computer and use it in GitHub Desktop.
Save masato3/b2bb37a4e32c4e3e8dbc4f9be591153f to your computer and use it in GitHub Desktop.
サクラエディタ マクロ 開いているファイルの親パスをTresGrepに投げる
// https://replication.hatenablog.com/entry/2014/03/06/002812
// シェルオブジェクトの作成
var oWsh = new ActiveXObject("WScript.Shell");
// 編集中ファイルのフルパスを取得する
var path = path = GetFilename;
// 格納先フォルダを取得する
var parPath = path.replace(/[^\\]*$/, "" );
// 親フォルダをTresGrepに投げる
oWsh.run("C:/tools/TresGrep/TresGrep.exe "+parPath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment