{{MatchedFiles[0].path}}
貌似有些问题,它会把反斜杠消掉,目前只能用quickcommand.payload[0].path
代替
{
"features": {
"code": "key_124d81pzveu",
"explain": "图片文件解析二维码",
"cmds": [
{
"label": "图片文件解析二维码",
"type": "files",
"match": "/.*/",
"minNum": 1
}
],
"icon": "logo/quickcommand.png",
"platform": [
"win32",
"darwin",
"linux"
]
},
"program": "quickcommand",
"cmd": "console.log(quickcommand.payload[0].path+'\\n'+'{{MatchedFiles[0].path}}')\n// utools.redirect('二维码', {\n// 'type': 'img',\n// 'data': `{{MatchedFiles[0].path}}`\n// })",
"output": "text",
"hasSubInput": false,
"scptarg": "",
"tags": []
}
这是输出:
E:\Code Box\py0\qrcode_dome.png
E:Code Boxpy0qrcode_dome.png