截图
{
"features": {
"code": "professional_17xi8frvuse",
"explain": "用fsc打开",
"cmds": [
"img",
{
"type": "img",
"label": "图片匹配"
},
{
"type": "files",
"label": "图片匹配",
"fileType": "image"
}
],
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAdrSURBVFhHvZcLbJPXFcfzcuLPSRzbaRiBQOImoUAZgdBMgmmDDmmkxDRatw6QpvLQ+kAq66g6CU0VSMvGCO0CrJ3WwIA2QB9sI23CYKh0XZU4D8fNy4mdt53EiR3i2HnHDpT/zr2fbWxjutFuu9JfN58d6/c/555zrh3xtdZz6ySyYrVG9trDu+gpUnzx/7EOb4xJLMnYpShO6pT/NqUy4nC61PvOf2VJ4uLi1LRnhpOgSc5LfkOlXXBcekd1SN4qWaVYHREXF/Z/wyiDJCGFXdF79+59ts1g6HS73V94xuxwz87A43aDnjE7N4cy01ksu5iMRacFLDuVCqPNhJmZGcxMT2OaaWoKU0yTk5j0amJigmt8fByjN296KioqtDk5Od8nXoyIFVfk/v37X/F4PHfm5+dBO9wOGzxvPA/PhcOYsbSjqPkgMssFpL8nIO2sgDPNpx8IzuVywUWyWq2zK1aseIK4UZwul8tVo6Oj4z44F4vc5cD8q1twa2cyPjmoxNNvJ0L9gYCCyo2YnJr8SnCX0wkn6fz589WEVnADa9as2XgPnKd9Fiebfgbr80p8sV2JWzuUuPqKElX6sq8Fd46NwdjePk7oLG4gLy8vPxQ+R2d+ylKCNY0y7CqXw7NTNMF0+5nFmP3z65gad30l+Bipu7t7mtCrgg144W73HD6xXcVjzXLk6GVYpZXh3BGF34BP7lfzMWk2PTB8zOFAd1dXiAE/3A2Ly4xNjWqsbiB4rQwrP5MhrzIe9t3BBm7/WAHPnixM1l57ILiD1BVkYO3afB98hlrv2caneNSPVhP8nzI88rGA7CsC/vB6phcswuefSoL7ySRMF6bA9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grrfeP1r5YKGhYjM08cpnLXe/s/epTpkE3c9fhE5bjbq6OgxQN7SFMxAIDzxzBmdjlY3TmwTnfd3bjRZVLPSx9zdQFy9A99PdaPjHDdTX16O2thZarRb91BH05TfYQFi497xZytlEYyPURkOE97W5Dy2LEsXqDwXHSqDb+SPor1+FTqfjUdfU1KC6uhpVVVViBgIN5ObmbgmE+877nqgDppmFerpF/ZCYAR84Ogq6bfnQV5SjoaFBjJrALGoGZmKvsS4wtLbeNaBSqVYS7LYPHho1G53+acYGSl8feqinW7IXijUQRYX4+Hfw+aV3eZHpAtLti5qJZYF9lhmorKy0EJr9WOEr/lRp6TVf2nnkXgOhF4mVTLAM9NNINSxfhPbvrUfXXz9g33DYHc9mPBsyrMpZmnnfU7Rs9PLPMTh1wZ3CwsI3iSsX8fTDJCEhYWVZWVkNwe/4Kp4ZCbrPmdidzkTGrNc/wgi7Xr0XDssUqxFmlmmYDDMx4wzMROP41r59+y4TcyXjcrp3sV8padnZ2c8UFBQce1KjOa7RaE48kLZuPbH1/jq+efPmo0qlcgdx0knRDBpusTfiSML/QOxXdAA4IuJfRDJp8TZEmhwAAAAASUVORK5CYII=",
"platform": [
"win32",
"darwin",
"linux"
]
},
"program": "quickcommand",
"cmd": "if (quickcommand.enterData.type == 'img') {\n var imgData = quickcommand.enterData.payload\n var base64Data = imgData.replace(/^data:image\\/\\w+;base64,/, \"\");\n var dataBuffer = new Buffer(base64Data, 'base64');\n var temp = \"d:\\aa.png\";\n fs.writeFile(temp, dataBuffer, function(err) {\n if (err) {\n return quickcommand.showMessageBox(err, \"error\");\n }\n // quickcommand.showMessageBox(\"File saved successfully!\");\n child_process.exec(\"E:\\\\Greensoft\\\\FastStoneCapturePortable\\\\FSCapture.exe \" + temp)\n })\n} else if (quickcommand.enterData.type == 'files') {\n var temp = String.raw `{{MatchedFiles[0].path}}`;\n child_process.exec(\"E:\\\\Greensoft\\\\FastStoneCapturePortable\\\\FSCapture.exe \" + temp)\n}",
"output": "ignore",
"hasSubInput": false,
"scptarg": "",
"charset": {
"scriptCode": "",
"outputCode": ""
},
"tags": [
"工具"
]
}
自行修改软件路径,和临时文件路径
if (quickcommand.enterData.type == 'img') {
var imgData = quickcommand.enterData.payload
var base64Data = imgData.replace(/^data:image\/\w+;base64,/, "");
var dataBuffer = new Buffer(base64Data, 'base64');
var temp = "d:\aa.png";
fs.writeFile(temp, dataBuffer, function(err) {
if (err) {
return quickcommand.showMessageBox(err, "error");
}
// quickcommand.showMessageBox("File saved successfully!");
child_process.exec("E:\\Greensoft\\FastStoneCapturePortable\\FSCapture.exe " + temp)
})
} else if (quickcommand.enterData.type == 'files') {
var temp = String.raw `{{MatchedFiles[0].path}}`;
child_process.exec("E:\\Greensoft\\FastStoneCapturePortable\\FSCapture.exe " + temp)
}