无聊写了个计算屏幕PPI的VB脚本。。。大家用用看吧
gpu吧
全部回复
仅看楼主
level 12
pengzhenxx 楼主
2013年04月06日 07点04分 1
level 12
pengzhenxx 楼主
源代码。。。。
dim h,w,d,j,e
set e=createobject("internetexplorer.application")
e.height=400
e.width=500
e.menubar=0
e.toolbar=0
e.statusbar=0
e.visible=1
e.navigate2 "about:blank"
e.resizable=0
with e.document
.writeln "<html><title>pengzhenxx</title><head>pengzhenxx:简单说一下 ppi反映了屏幕细腻度,ppi越大屏幕看起来越清晰细腻。比如爱疯的ppi达到了 329,据说ppi只要高于300人眼就不能看出屏幕颗粒了也就是'视网膜屏幕'.</head><body><p>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$</p><p>请输入屏幕的高(分辨率):<input type=text name=t1></p><p> 请输入屏幕的宽(分辨率):<input type=text name=t2></p><p>请输入屏幕大小:<input type=text name=t3></p><p><input type=button name=b1 value=' 好了 '></p><p><input type=button name=b2 value=' 退出 '></p></p></body></html>"
end with
set names=e.document.all
set names.b1.onclick=getref("b")
set names.b2.onclick=getref("bb")
do while true
wscript.sleep 200
loop
sub bb
e.quit
wscript.quit
end sub
sub b
h=names.t1.value
w=names.t2.value
d=names.t3.value
if IsNumeric(h)=0 then
msgbox("屏幕大小是数值吧,汗")
elseif IsNumeric(w)=0 then
msgbox("屏幕大小是数值吧,汗")
elseif isnumeric(d)=0 then
msgbox("屏幕大小是数值吧,汗")
else
j=int(sqr(int(h)^2+int(w)^2)/cdbl(d))
if j=329 then
msgbox "高帅富滚粗!!"
e.quit
wscript.quit
end if
msgbox "您的屏幕ppi是:"&cstr(j)
end if
end sub
2013年04月06日 07点04分 2
level 10
这……咱说啥也得调用API来获取屏幕大小和分辨率吧……
2013年04月06日 10点04分 3
VBS的API没办法获取显示器大小啊,,分辨率到可以获取
2013年04月06日 12点04分
VBS啊……没仔细看……
2013年04月06日 12点04分
1