################创建脚本->开始################
INSERT INTO 脚本 (排序号,脚本名称) values(7616406490,"数独_20251028163832")
################创建脚本->结束################
################创建任务1->开始################
INSERT INTO 任务 (排序号,脚本id,任务名称,启用,是否集合,分组) values(7616346917,[脚本id],"数独",0,0,"全部")
################创建任务1->结束################
################创建任务1步骤->开始################
INSERT INTO 步骤 (步骤号,排序号,操作,任务id,类型,步骤开关,键盘_动作,键盘_功能键代码,键盘_键代码,鼠标_按键,鼠标_动作,鼠标_点击位置,鼠标_点击次数,鼠标_坐标x,鼠标_坐标y,鼠标_滚轮次数,鼠标_移动设置,鼠标_移动速度,其他设置_固定延迟,其他设置_随机延迟最小值,其他设置_随机延迟最大值,图片识别_名称,图片识别_相似度,图片识别_图片,图片识别_找到后,图片识别_重复间隔,图片识别_重复次数,图片识别_偏移x,图片识别_偏移y,图片识别_找到跳步骤,图片识别_找不到跳步骤,文本操作_输入文本,鼠标_录制脚本,图片识别_找不到,流程_跳步骤,键盘_键名,图片识别_查找范围,图片识别_范围左x,图片识别_范围左y,图片识别_范围右x,图片识别_范围右y,图片识别_查找方向,通用_文本1,通用_文本2,通用_文本3,通用_文本4,通用_数字1,通用_数字2,通用_数字3,通用_数字4,备注) values(3182,"7615561724","流程控制",[任务id],"变量操作",0,"",0,0,"","","",0,0,0,0,"",0,0,0,0,"",0,"","c",0,0,0,0,0,0,"class SudokuSolver {#换行#  constructor(board) {#换行#    this.board = board.map(row => [...row]);#换行#    this.size = 9;#换行#    this.boxSize = 3;#换行#    this.rowUsed = new Array(9).fill(0); // 行使用状态位掩码#换行#    this.colUsed = new Array(9).fill(0); // 列使用状态位掩码#换行#    this.boxUsed = new Array(9).fill(0); // 宫格使用状态位掩码#换行#    this.emptyCells = []; // 空白格列表#换行#    this.init();#换行#  }#换行##换行#  // 初始化状态#换行#  init() {#换行#    for (let i = 0; i < this.size; i++) {#换行#      for (let j = 0; j < this.size; j++) {#换行#        if (this.board[i][j] !== 0) {#换行#          const num = this.board[i][j] - 1; // 转为0-8索引#换行#          const boxIdx = Math.floor(i / 3) * 3 + Math.floor(j / 3);#换行#          this.rowUsed[i] |= 1 << num;#换行#          this.colUsed[j] |= 1 << num;#换行#          this.boxUsed[boxIdx] |= 1 << num;#换行#        } else {#换行#          this.emptyCells.push([i, j]);#换行#        }#换行#      }#换行#    }#换行#    // 按候选数数量排序空白格（最小剩余值策略）#换行#    this.emptyCells.sort((a, b) => this.getCandidateCount(a) - this.getCandidateCount(b));#换行#  }#换行##换行#  // 计算候选数数量#换行#  getCandidateCount([i, j]) {#换行#    const boxIdx = Math.floor(i / 3) * 3 + Math.floor(j / 3);#换行#    const used = this.rowUsed[i] | this.colUsed[j] | this.boxUsed[boxIdx];#换行#    return this.size - this.countBits(used);#换行#  }#换行##换行#  // 计算位中1的数量#换行#  countBits(n) {#换行#    return n.toString(2).split('0').join('').length;#换行#  }#换行##换行#  // 获取候选数列表#换行#  getCandidates([i, j]) {#换行#    const boxIdx = Math.floor(i / 3) * 3 + Math.floor(j / 3);#换行#    const used = this.rowUsed[i] | this.colUsed[j] | this.boxUsed[boxIdx];#换行#    const candidates = [];#换行#    for (let num = 0; num < this.size; num++) {#换行#      if (!(used & (1 << num))) {#换行#        candidates.push(num + 1); // 转回1-9#换行#      }#换行#    }#换行#    return candidates;#换行#  }#换行##换行#  // 回溯求解#换行#  backtrack(index = 0) {#换行#    if (index === this.emptyCells.length) return true;#换行#    const [i, j] = this.emptyCells[index];#换行#    const candidates = this.getCandidates([i, j]);#换行#    #换行#    for (const num of candidates) {#换行#      const bit = 1 << (num - 1);#换行#      const boxIdx = Math.floor(i / 3) * 3 + Math.floor(j / 3);#换行#      #换行#      // 尝试放置数字#换行#      this.board[i][j] = num;#换行#      this.rowUsed[i] |= bit;#换行#      this.colUsed[j] |= bit;#换行#      this.boxUsed[boxIdx] |= bit;#换行#      #换行#      if (this.backtrack(index + 1)) return true;#换行#      #换行#      // 回溯#换行#      this.board[i][j] = 0;#换行#      this.rowUsed[i] ^= bit;#换行#      this.colUsed[j] ^= bit;#换行#      this.boxUsed[boxIdx] ^= bit;#换行#    }#换行#    return false;#换行#  }#换行##换行#  // 求解并输出结果#换行#  solveAndPrint() {#换行#    if (this.backtrack()) {#换行#      console.log('数独求解结果：');#换行#      this.printBoard();#换行#      return this.board;#换行#    } else {#换行#      console.log('该数独无解');#换行#      return null;#换行#    }#换行#  }#换行##换行#  // 格式化打印#换行#  printBoard() {#换行#    for (let i = 0; i < this.size; i++) {#换行#      let row = '';#换行#      for (let j = 0; j < this.size; j++) {#换行#        row += this.board[i][j] + ' ';#换行#        if ((j + 1) % 3 === 0 && j < 8) row += '| ';#换行#      }#换行#      console.log(row);#换行#      if ((i + 1) % 3 === 0 && i < 8) console.log('-'.repeat(21));#换行#    }#换行#  }#换行#}#换行##换行#// 测试用例（图片中的数独矩阵）#换行#const sudoku = [#换行#  [0, 0, 0, 7, 9, 3, 1, 4, 0],#换行#  [4, 3, 2, 0, 0, 8, 0, 0, 7],#换行#  [1, 0, 9, 4, 6, 2, 0, 8, 0],#换行#  [0, 9, 3, 0, 4, 5, 8, 0, 1],#换行#  [0, 5, 0, 3, 2, 7, 0, 9, 0],#换行#  [6, 0, 4, 1, 8, 0, 7, 5, 0],#换行#  [2, 6, 0, 9, 0, 0, 5, 0, 4],#换行#  [3, 4, 0, 8, 7, 6, 2, 0, 0],#换行#  [0, 0, 7, 2, 0, 0, 6, 3, 8]#换行#];#换行##换行#// 直接求解并输出结果#换行#return new SudokuSolver(sudoku).solveAndPrint();#换行##换行#","","",0,"","","","","","",0,"c","","","执行js脚本",0,0,0,0,"")
INSERT INTO 步骤 (步骤号,排序号,操作,任务id,类型,步骤开关,键盘_动作,键盘_功能键代码,键盘_键代码,鼠标_按键,鼠标_动作,鼠标_点击位置,鼠标_点击次数,鼠标_坐标x,鼠标_坐标y,鼠标_滚轮次数,鼠标_移动设置,鼠标_移动速度,其他设置_固定延迟,其他设置_随机延迟最小值,其他设置_随机延迟最大值,图片识别_名称,图片识别_相似度,图片识别_图片,图片识别_找到后,图片识别_重复间隔,图片识别_重复次数,图片识别_偏移x,图片识别_偏移y,图片识别_找到跳步骤,图片识别_找不到跳步骤,文本操作_输入文本,鼠标_录制脚本,图片识别_找不到,流程_跳步骤,键盘_键名,图片识别_查找范围,图片识别_范围左x,图片识别_范围左y,图片识别_范围右x,图片识别_范围右y,图片识别_查找方向,通用_文本1,通用_文本2,通用_文本3,通用_文本4,通用_数字1,通用_数字2,通用_数字3,通用_数字4,备注) values(3272,"7615561725","流程控制",[任务id],"变量操作",0,"",0,0,"","","",0,0,0,0,"",0,0,0,0,"",0,"","a",0,0,0,0,0,0,"#换行#const transformSudoku = (str) => {#换行#  // 将输入字符串分割为单个数字数组#换行#  const nums = str.split(',').map(Number);#换行#  #换行#  // 按9个数字一组拆分为二维数组（9行）#换行#  const rows = Array.from({ length: 9 }, (_, i) => #换行#    nums.slice(i * 9, (i + 1) * 9)#换行#  );#换行#  #换行#  // 格式化每行：3个数字一组，用|分隔，第4个和第7个数字前不加逗号#换行#  return rows.map(row => {#换行#    let formattedRow = '';#换行#    for (let i = 0; i < row.length; i++) {#换行#      // 在第4个位置（索引3）和第7个位置（索引6）前不加逗号#换行#      if (i === 3 || i === 6) {#换行#        formattedRow += `${row[i]}`;#换行#      } else if (i > 0) {#换行#        formattedRow += `,${row[i]}`;#换行#      } else {#换行#        formattedRow += `${row[i]}`;#换行#      }#换行#      #换行#      // 每3个数字后添加|分隔符（最后一组不加）#换行#      if ((i + 1) % 3 === 0 && i !== 8) {#换行#        formattedRow += '|';#换行#      }#换行#    }#换行#    return formattedRow;#换行#  }).join('\r\n');#换行#};#换行##换行#// 使用示例#换行#const input = ""$c$"";#换行#const formattedSudoku = transformSudoku(input);#换行#return(formattedSudoku);#换行#","","",0,"","","","","","",0,"a","","","执行js脚本",0,0,0,0,"")
INSERT INTO 步骤 (步骤号,排序号,操作,任务id,类型,步骤开关,键盘_动作,键盘_功能键代码,键盘_键代码,鼠标_按键,鼠标_动作,鼠标_点击位置,鼠标_点击次数,鼠标_坐标x,鼠标_坐标y,鼠标_滚轮次数,鼠标_移动设置,鼠标_移动速度,其他设置_固定延迟,其他设置_随机延迟最小值,其他设置_随机延迟最大值,图片识别_名称,图片识别_相似度,图片识别_图片,图片识别_找到后,图片识别_重复间隔,图片识别_重复次数,图片识别_偏移x,图片识别_偏移y,图片识别_找到跳步骤,图片识别_找不到跳步骤,文本操作_输入文本,鼠标_录制脚本,图片识别_找不到,流程_跳步骤,键盘_键名,图片识别_查找范围,图片识别_范围左x,图片识别_范围左y,图片识别_范围右x,图片识别_范围右y,图片识别_查找方向,通用_文本1,通用_文本2,通用_文本3,通用_文本4,通用_数字1,通用_数字2,通用_数字3,通用_数字4,备注) values(3183,"7615561726","调试设置",[任务id],"输出日志",0,"",0,0,"","","",0,0,0,0,"",0,0,0,0,"",0,"","",0,0,0,0,0,0,"$a$","","",0,"","","","","","",0,"","","","",0,0,0,0,"")
INSERT INTO 步骤 (步骤号,排序号,操作,任务id,类型,步骤开关,键盘_动作,键盘_功能键代码,键盘_键代码,鼠标_按键,鼠标_动作,鼠标_点击位置,鼠标_点击次数,鼠标_坐标x,鼠标_坐标y,鼠标_滚轮次数,鼠标_移动设置,鼠标_移动速度,其他设置_固定延迟,其他设置_随机延迟最小值,其他设置_随机延迟最大值,图片识别_名称,图片识别_相似度,图片识别_图片,图片识别_找到后,图片识别_重复间隔,图片识别_重复次数,图片识别_偏移x,图片识别_偏移y,图片识别_找到跳步骤,图片识别_找不到跳步骤,文本操作_输入文本,鼠标_录制脚本,图片识别_找不到,流程_跳步骤,键盘_键名,图片识别_查找范围,图片识别_范围左x,图片识别_范围左y,图片识别_范围右x,图片识别_范围右y,图片识别_查找方向,通用_文本1,通用_文本2,通用_文本3,通用_文本4,通用_数字1,通用_数字2,通用_数字3,通用_数字4,备注) values(3184,"7615561727","流程控制",[任务id],"结束运行",0,"",0,0,"","","",0,0,0,0,"",0,0,0,0,"",0,"","",0,0,0,0,0,0,"","","",0,"","","","","","",0,"","","","",0,0,0,0,"")
################创建任务1步骤->结束################
################创建绑定->开始################
INSERT INTO 绑定 (脚本id,模式,标准_绑定设置,高级_识别模式,高级_绑定模式,高级_鼠标模式,高级_键盘模式) values([脚本id],"","","","","","")
################创建绑定->结束################
################创建设置>开始################
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"集合分组","全部")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"任务线程数","1")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"窗口线程数","-1")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"每步骤间隔","50")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"全局偏移X","0")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"全局偏移Y","0")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"运行速度","1")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"鼠标间隔","30")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"键盘间隔","30")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"任务执行设置","同时")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"测试窗口句柄","65856")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"测试窗口提示","句柄：65856大小：2560*1440#换行#进程名：explorer.exe#换行#标题：Program Manager")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"轨迹移动距离","100")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"轨迹移动延迟","10")
INSERT INTO 设置 (脚本id,配置,值) values([脚本id],"轨迹移动开启","0")
################创建设置>结束################