Help us understand the problem. What is going on with this article?

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

More than 5 years have passed since last update.
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 を実行。

hokorobi
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away