开发者

Komodo Edit "new command" options memory

I am using Komodo Edit 5.2.4. I have set up a custom "new command" which takes some input from the user and executes a program with it. This works fine, but I want the ability to default the options to the options the user previously selected the last time they ran the command.

I can't figure out how to do this, alt开发者_Python百科hough I can see that previous entries are recorded in the combobox itself...any ideas?


Use a prompt to assign the options to a variable, then run the command using runEncodedCommand

komodo.assertMacroVersion(2);
if (komodo.view && komodo.view.scintilla) { komodo.view.scintilla.focus(); }

function runmemo()
  {
  if (!this.param)
    {
    this.param = window.prompt("What you really want");
    }
ko.run.runEncodedCommand("window", "echo {1: '"+escape(this.param)+"'}");
  }
runmemo();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜