Komodo编辑“新命令”选项内存

发布于 2024-08-24 18:14:29 字数 150 浏览 6 评论 0原文

我正在使用科莫多编辑 5.2.4。我已经设置了一个自定义的“新命令”,它接受用户的一些输入并用它执行一个程序。这工作正常,但我希望能够将选项默认为用户上次运行命令时选择的选项。

我不知道如何做到这一点,尽管我可以看到以前的条目记录在组合框本身中......有什么想法吗?

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, although I can see that previous entries are recorded in the combobox itself...any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

书信已泛黄 2024-08-31 18:14:29

使用提示将选项分配给变量,然后使用<运行命令a href="http://docs.activestate.com/komodo/5.1/macroapi.html#macroapi_runencodedcommand" rel="nofollow">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();

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();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文