aardio写网站部署到服务器步骤,Jacen.He直接写了个播放器,播放器就是想aardio论坛那个帖子里采集图片地址,然后默认调用第一张。然后随着上一张或者下一张调用不同的图片。代码写的好转载下。
import gdip.fontAwesome; import win.ui; /*DSG{{*/ var winform = win.form(text="aadio网页部署到服务器步骤";right=1342;bottom=805;bgcolor=16777215) winform.add( btnNext={cls="plus";text='\uF061';left=1146;top=774;right=1208;bottom=797;color=8421376;db=1;dr=1;font=LOGFONT(name='FontAwesome';h=-21);notify=1;z=4}; btnPrev={cls="plus";text='\uF060';left=1065;top=774;right=1127;bottom=797;color=8421376;db=1;dr=1;font=LOGFONT(name='FontAwesome';h=-21);notify=1;z=3}; plus={cls="plus";left=6;top=7;right=1343;bottom=766;db=1;dl=1;dr=1;dt=1;notify=1;repeat="scale";z=1}; plusLink={cls="plus";text="打开教程";left=859;top=774;right=921;bottom=797;db=1;dr=1;notify=1;z=2} ) /*}}*/ winform.show(); import inet.http; var html = inet.http().get("http://bbs.aardio.com/forum.php?mod=viewthread&tid=22327&extra="); var images = {} for png in string.gmatch( html,"https\://upload-images.jianshu.io/upload_images/[\w-]+.png") { table.push(images,png) } images.index = 0; nextImage = function(step){ images.index = images.index + step; if( images.index > #images ) { images.index = #images; winform.msgbox("已经是最后一步了"); return; } if( images.index < 1 ) { images.index = 1; winform.msgbox("已经是第一步了"); return; } winform.text = "正在打开图像...." var img = images[images.index]; if( type(img) == type.string ){ img = win.invoke( function(url){ import inet.http; return inet.http().get(url); },img ) if( img ){ img = gdip.bitmap(img); images[images.index] = img; } } winform.plus.setBackground(img,,true); winform.text = "aadio网页部署到服务器步骤:" + images.index; } nextImage(1); winform.plusLink.skin( color = { hover = 0xFFFF0000; active = 0xFF00FF00; default = 0xFF0000FF; } border = { hover = {bottom=1;color=0xE90000FF} } ) winform.plusLink.oncommand = function(id,event){ win.invoke( function(){ import process process.execute("http://bbs.aardio.com/forum.php?mod=viewthread&tid=22327&extra=") } ) } winform.btnNext.skin( color = { hover = 0xFFFF0000; active = 0xFF00FF00; } ) winform.btnNext.oncommand = function(id,event){ nextImage(1); } winform.btnPrev.skin( color = { hover = 0xFFFF0000; active = 0xFF00FF00; } ) winform.btnPrev.oncommand = function(id,event){ nextImage(-1); } winform.show(); win.loopMessage();
注意:转至http://bbs.aardio.com/forum.php?mod=viewthread&tid=22327&extra=