(转)将blink打开的网页截图并保存到本地
By
admin
at 2018-10-15 • 0人收藏 • 1269人看过
将blink打开的网页截图并保存到本地: (感谢 群里 @if 分享)
import win.ui; /*DSG{{*/ var winform = win.form(text="aardio form";right=759;bottom=469) winform.add( button={cls="button";text="Button";left=544;top=123;right=635;bottom=186;z=2}; static={cls="static";text="Static";left=48;top=56;right=438;bottom=309;transparent=1;z=1} ) /*}}*/ import web.blink.form; var mb = web.blink.form(winform.static); mb.go("http://www.baidu.com/"); mb.wait(""); winform.button.oncommand = function(id,event){ var path = io.localpath("~/tmp.jpg"); import web.blink.bitmap; bmp = web.blink.bitmap(mb); bmp.save(path,40); bmp.dispose(); import process; process.execute(path); } winform.show(); win.loopMessage(); return winform;
登录后方可回帖