g00001
2022-07-06 19:06:17 +08:00
用 aardio 随手写了一个:
import zbar;
import win.clip;
import mouse.screenArea;
import gdip.snap;
//截屏
var screenArea = mouse.screenArea();
screenArea.onSelectionChanged = function(rc){
var bmp = gdip.snap(screenArea.hwnd,rc.xywh());
//识别二维码
var scanner = zbar.scanner();
scanner.config('qrcode.enable');
scanner.scanBitmap(bmp,function(typeName,data){
//复制到剪贴板
win.clip.write(data)
screenArea.close();
})
}
screenArea.doModal();