LoginSignup
0
0

More than 5 years have passed since last update.

#PPx Paper Plane xUI において開いているタブのパスをコピー先としてメニュー表示

Last updated at Posted at 2015-02-05
copy_menu.js
//!*script
// タブをメニューとして表示してコピー先を選択する
// PPx 1.41 x64 + Script Module R14

var tabs = PPx.Pane.Tab;
if (tabs.Count < 3) PPx.Execute('%k"C"'); // タブが3個未満なら普通のコピー

var tab = '';
var paths = {};
var path = '';
for (var i = 0; i < tabs.Count; i++) {
    tab = tabs.Item(i);
    path = tab.Extract('%D');
    if (tab.Type == 1) {
        paths[path] = 1;
        continue;
    }
    if (paths[path] == undefined) paths[path] = 0;
}

var id = 65; // A
PPx.Execute("*setcust -|M_copy_to="); // 初期化
for (var path in paths) {
    if (paths[path] == 1) var focus = String.fromCharCode(id);
    PPx.Execute('*setcust M_copy_to:&' + String.fromCharCode(id) + ' ' + path.replace('\\t', '\\\\t') + '= *ppcfile copy, "' + path + '"\n');
    id++;
}
PPx.Execute("%M_copy_to," + focus); // 反対窓のパスを選択

を作って *script copy_menu.js を実行。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0