用vbs实现显示系统调色板的代码
(编辑:jimmy 日期: 2024/12/28 浏览:3 次 )
复制代码 代码如下:
set ie = createobject("internetexplorer.application")
ie.navigate "about:blank"
do until ie.readystate = 4 : wscript.sleep 25 : loop
set doc = ie.document
set body = doc.body
set win = doc.parentwindow
body.innerhtml = "<OBJECT id=dlg CLASSID='clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b'></OBJECT>"
body.innertext = doc.getElementById("dlg").choosecolordlg
win.clipboarddata.setdata "text", body.innertext
ie.quit
set ie = createobject("internetexplorer.application")
ie.navigate "about:blank"
do until ie.readystate = 4 : wscript.sleep 25 : loop
set doc = ie.document
set body = doc.body
set win = doc.parentwindow
body.innerhtml = "<OBJECT id=dlg CLASSID='clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b'></OBJECT>"
body.innertext = doc.getElementById("dlg").choosecolordlg
win.clipboarddata.setdata "text", body.innertext
ie.quit
下一篇:VBS可以做什么的简单说明