- 帖子
- 142
- 积分
- 182
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2012-1-6
|
[其他] 求助:各位大佬,能否帮忙写个添加文本的批处理
文件是.js格式的
{"name":"XdRs_VirtualButton","status":false,"description":"虚拟按键 <MV + MZ>","parameters":{"rockerX":"20","rockerY":"450","rockerDiam":"160","keyA":"{\"x\":\"590\",\"y\":\"540\",\"width\":\"86\",\"height\":\"56\",\"value\":\"90\",\"text\":\"A\"}","keyB":"{\"x\":\"700\",\"y\":\"540\",\"width\":\"86\",\"height\":\"56\",\"value\":\"88\",\"text\":\"B\"}","keyC":"","keyD":"","keyE":""}},
];
如果在最后一行的【];】前没有发现
{"name":"Cheat_Menu","status":true,"description":"","parameters":{}},
{"name":"Drill_SpeedGear","status":true,"description":"[v1.2] 系统 - 变速齿轮","parameters":{"初始齿轮速度":"2.50","是否绑定齿轮到变量":"false","绑定的变量":"0","声音是否变速":"true","声音变速同步率":"0.25"}}
则添加
{"name":"Cheat_Menu","status":true,"description":"","parameters":{}},
{"name":"Drill_SpeedGear","status":true,"description":"[v1.2] 系统 - 变速齿轮","parameters":{"初始齿轮速度":"2.50","是否绑定齿轮到变量":"false","绑定的变量":"0","声音是否变速":"true","声音变速同步率":"0.25"}}
,如果有则不添加
添加后是这样的,
{"name":"XdRs_VirtualButton","status":false,"description":"虚拟按键 <MV + MZ>","parameters":{"rockerX":"20","rockerY":"450","rockerDiam":"160","keyA":"{\"x\":\"590\",\"y\":\"540\",\"width\":\"86\",\"height\":\"56\",\"value\":\"90\",\"text\":\"A\"}","keyB":"{\"x\":\"700\",\"y\":\"540\",\"width\":\"86\",\"height\":\"56\",\"value\":\"88\",\"text\":\"B\"}","keyC":"","keyD":"","keyE":""}},
{"name":"Cheat_Menu","status":true,"description":"","parameters":{}},
{"name":"Drill_SpeedGear","status":true,"description":"[v1.2] 系统 - 变速齿轮","parameters":{"初始齿轮速度":"2.50","是否绑定齿轮到变量":"false","绑定的变量":"0","声音是否变速":"true","声音变速同步率":"0.25"}}
];
请各位大佬帮忙写个判断的批处理 |
|