Skip to content

[bug report]:如果对有subroutine的脚本指定n次运行,会将其中的subroutine也变为n次 #362

@Sucrosato

Description

@Sucrosato

我已查看以往的issue并且没有找到类似的问题

  • I have checked the previous issues and there is no simular problems.

描述你遇到的bug以及如何复现

例如 [a, subroutine, b]的脚本,如果指定运行2次,执行顺序会变为[a, subroutine, subroutine, b, a, subroutine, subroutine, b],这个应该不是刻意设计成这样的吧

截图

No response

你使用的软件版本

5.2.1

你使用的操作系统版本

windows10 22h2

其它与问题相关的信息

复现用到的脚本(运行两次的结果是输出f11wf11w):

//test.json5
{
  scripts: [
    {
      delay: 429,
      event_type: "EK",
      action_type: "key down",
      action: [
        70,
        "F",
        0,
      ],
      type: "event",
    },
    {
      delay: 71,
      event_type: "EK",
      action_type: "key up",
      action: [
        70,
        "F",
        0,
      ],
      type: "event",
    },
    {
      type: "subroutine",
      path: ["E:/Apps/git_repos/KeymouseGo/dist/scripts/0101_1352.json5"], //0101_1352.json5的地址
    },
    {
      delay: 324,
      event_type: "EK",
      action_type: "key down",
      action: [
        87,
        "W",
        0,
      ],
      type: "event",
    },
    {
      delay: 116,
      event_type: "EK",
      action_type: "key up",
      action: [
        87,
        "W",
        0,
      ],
      type: "event",
    },
  ],
}

//0101_1352.json5
{
  scripts: [
    {
      delay: 2548,
      event_type: "EK",
      action_type: "key down",
      action: [
        49,
        "1",
        0,
      ],
      type: "event",
    },
    {
      delay: 96,
      event_type: "EK",
      action_type: "key up",
      action: [
        49,
        "1",
        0,
      ],
      type: "event",
    },
  ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions