中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
作者:
标题: IE工具栏增强→VBS版 上一主题 | 下一主题
baomaboy
银牌会员





积分 1513
发帖 554
注册 2005-12-30
状态 离线
『楼 主』:  IE工具栏增强→VBS版

VBS+nircmd for Internet Explorer

IE工具栏增强→VBS版

一、在IE工具栏添加图标:
①设置IE窗口透明(5级)。
②最小化所有IE窗口。
③关闭所有IE窗口。
④隐藏所有IE窗口。
⑤关于增强工具的效果演示。

二、添加快捷键:
“Ctrl + Alt + Q ”用于隐藏所有IE窗口后复原窗口。



安装完成后如IE工具栏没出现图标则需要在“自定义工具栏”中手动添加。





好多菩提树,好多明镜台。本来好多物,好多的尘埃。
2007-4-29 17:26
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
flyinspace
银牌会员





积分 1206
发帖 517
注册 2007-3-25
状态 离线
『第 2 楼』:  

可以获得兄这个工具的源代码么??



知,不觉多。不知,乃求知
2007-4-29 17:32
查看资料  发短消息 网志   编辑帖子  回复  引用回复
baomaboy
银牌会员





积分 1513
发帖 554
注册 2005-12-30
状态 离线
『第 3 楼』:  



  Quote:
Originally posted by flyinspace at 2007-4-29 17:32:
可以获得兄这个工具的源代码么??



  Quote:
Dim WshSHell,FSO
On Error Resume Next
Set WshSHell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WinVer = WshSHell.Environment("Process")
Set Args = WScript.Arguments
CloseTime = 8
FileName = WScript.ScriptName
FileFullName = WScript.ScriptFullName
FilePath = FSO.GetParentFolderName(FileFullName)
InsPath = FSO.GetSpecialFolder(1)
InsFullName = FSO.BuildPath(InsPath ,FileName)
LnkPathNT = WshSHell.SpecialFolders(2)
LnkPath9X = WshSHell.SpecialFolders(14)
LnkPathAll = WshSHell.SpecialFolders("Programs")
OtherFileName="nircmd.exe"
OtherFilePath=FSO.GetSpecialFolder(1)
TemFileName="无标题"
TemFilePath=FSO.GetSpecialFolder(2)
Copyright="玲珑科技"
QQ="QQ:25926183"
Email="Email:fty1995@163.com"
InsTitle="浏览器增强工具(IE版)"
InsAnswer="浏览器增强工具(IE版)"
MyShortcutFolder="快捷功能"
MyShortcutName="显示所有IE窗口(Ctrl+Alt+Q).Lnk"
MyShortcutHotKey="Ctrl+Alt+Q"
RegPath1="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Extensions\"
RegPath2=split("{D6E814A0-E0C5-11d4-8D29-0050BA6940E4}\,{D7E814A0-E0C5-11d4-8D29-0050BA6940E5}\,{D8E814A0-E0C5-11d4-8D29-0050BA6940E6}\,{D9E814A0-E0C5-11d4-8D29-0050BA6940E7}\,{D9E814A0-E0C5-11d4-8D29-0050BA6940E8}\",",")
RegValue1=split("设置窗口透明,最小所有窗口,关闭所有窗口,隐藏所有窗口(Ctrl+Alt+Q 还原),关于IE窗口(效果演示)",",")
RegValue2=split("242,246,240,249,239",",")
RegValue3=split("242,246,240,249,269",",")
RegValue4=split("设置窗口透明,最小所有窗口,关闭所有窗口,隐藏所有窗口,关于IE窗口",",")
RegValue5=split("设置窗口透明(&T),最小所有窗口(&M),关闭所有窗口(&C),隐藏所有窗口(&H),关于IE窗口(&A)",",")
RegValue6=split("T,M,C,H,A",",")
RegForm1="REG_SZ"
IF LCase(FileFullName) <> LCase(InsFullName) then
intAnswer = MsgBox("【是】将“"+ InsAnswer +"”加入到IE工具栏,"&Chr(10)&Chr(10)&"【否】将“"+ InsAnswer +"”从IE工具栏删除。 ", vbQuestion + vbYesNoCancel, "安装 - "+ InsTitle +" - "+ Copyright)
    If intAnswer = vbYes Then
For i=0 To UBound(RegPath2)
WshSHell.RegWrite RegPath1&RegPath2(i)&"ButtonText",RegValue1(i),RegForm1
WshSHell.RegWrite RegPath1&RegPath2(i)&"HotIcon",InsPath&"\shell32.dll,"&RegValue2(i),RegForm1
WshSHell.RegWrite RegPath1&RegPath2(i)&"Icon",InsPath&"\shell32.dll,"&RegValue3(i),RegForm1
WshSHell.RegWrite RegPath1&RegPath2(i)&"MenuStatusBar",RegValue4(i),RegForm1
WshSHell.RegWrite RegPath1&RegPath2(i)&"MenuText",RegValue5(i),RegForm1
WshSHell.RegWrite RegPath1&RegPath2(i)&"Exec",chr(34) & InsPath &"\IEO"& RegValue6(i) &".vbs"& chr(34),RegForm1
WshSHell.RegWrite RegPath1&RegPath2(i)&"CLSID","{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}",RegForm1
WshSHell.RegWrite RegPath1&RegPath2(i)&"Default Visible","Yes",RegForm1
Set otFile=FSO.OpenTextFile(InsPath &"\IEO"& RegValue6(i) &".vbs",2,True)
otfile.WriteLine("WScript.CreateObject(""WScript.Shell"").Run(""wscript.exe "&InsFullName&chr(32)&RegValue6(i)&"""):WScript.Quit")
otFile.Close
Next
Set otFile=FSO.OpenTextFile(InsPath &"\IEOS.vbs",2,True)
otfile.WriteLine("WScript.CreateObject(""WScript.Shell"").Run(""wscript.exe "&InsFullName&chr(32)&"S"&"""):WScript.Quit")
otFile.Close
WshSHell.RegWrite "HKLM\SOFTWARE\LLKJ\SYSSoft\IE_Optimize\","IE工具栏增强","REG_SZ"
WshSHell.RegWrite "HKLM\SOFTWARE\LLKJ\SYSSoft\IE_Optimize\TM","175","REG_SZ"
FSO.GetFile(FileFullName).Copy(InsFullName)
Call alltovbs
If (FSO.FolderExists(FSO.BuildPath(LnkPathAll ,"\附件\" & MyShortcutFolder))) Then
else
FSO.CreateFolder(FSO.BuildPath(LnkPathAll ,"\附件\" & MyShortcutFolder))
end if
Set MyShortcut = WshShell.CreateShortcut(FSO.BuildPath(LnkPathAll ,"附件\" & MyShortcutFolder & "\" & MyShortcutName))
MyShortcut.TargetPath = (InsPath &"\IEOS.vbs")
MyShortcut.WorkingDirectory = (InsPath)
MyShortcut.Windowstyle = 4
MyShortcut.Description = "显示所有IE窗口"
MyShortcut.Hotkey = MyShortcutHotKey
MyShortcut.Save
WshSHell.popup _
"添加脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"添加系统热键:" +chr(10)+chr(34) & MyShortcutHotKey +chr(34)+chr(10)+chr(10)+ _
"添加执行文件:"+chr(10)+FSO.BuildPath(OtherFilePath,OtherFileName)+chr(10)+chr(10)+ _
"添加注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10) & _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C)  " + Copyright +"   " & QQ &"   " + Email _
, CloseTime, "安装成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
        If intAnswer = vbNo Then
For i=0 To UBound(RegPath2)
WshSHell.RegDelete RegPath1&RegPath2(i)
WshSHell.RegDelete InsPath &"\IEO"& RegValue6(i) &".vbs"
Next
WshSHell.RegDelete InsPath &"\IEOS.vbs"
WshSHell.RegDelete "HKLM\SOFTWARE\LLKJ\SYSSoft\IE_Optimize\"
FSO.DeleteFile InsFullName
FSO.DeleteFile FSO.BuildPath(LnkPathAll ,"附件\" & MyShortcutFolder & "\" & MyShortcutName)
intAnswer = MsgBox("【是】将保留文件“"+ OtherFileName +"”为其他程序服务,"&Chr(10)&Chr(10)&"【否】将彻底删除“"+ OtherFileName +"”文件由系统目录。 ", vbQuestion + vbYesNo, "卸载 - "+ InsTitle +" - "+ Copyright)
       If intAnswer = vbYes Then
FSO.DeleteFile FSO.BuildPath(OtherFilePath,OtherFileName)
WshSHell.popup _
"删除脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"删除系统热键:" +chr(10)+chr(34) & MyShortcutHotKey +chr(34)+chr(10)+chr(10)+ _
"删除注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10) & _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C)  " + Copyright +"   " & QQ &"   " + Email _
, CloseTime, "卸载成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
        If intAnswer = vbNo Then
WshSHell.popup _
"删除脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"删除系统热键:" +chr(10)+chr(34) & MyShortcutHotKey +chr(34)+chr(10)+chr(10)+ _
"删除执行文件:"+chr(10)+FSO.BuildPath(OtherFilePath,OtherFileName)+chr(10)+chr(10)+ _
"删除注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10) & _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C)  " + Copyright +"   " & QQ &"   " + Email _
, CloseTime, "卸载成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
end if
        If intAnswer = vbCancel Then
end if
ELSE
if Args(0)="T" then
TM=Round(WshSHell.RegRead("HKLM\SOFTWARE\LLKJ\SYSSoft\IE_Optimize\TM"),0)
WshSHell.Run("nircmd.exe win trans ititle ""internet explorer"" "&TM), vbHide
TMS=Round(TM+20,0)
if TMS > 255 then TMS=175
WshSHell.RegWrite "HKLM\SOFTWARE\LLKJ\SYSSoft\IE_Optimize\TM",TMS,"REG_SZ"
elseif Args(0)="M" then
WshSHell.Run("nircmd.exe win min class ""IEFrame"""), vbHide
elseif Args(0)="C" then
WshSHell.Run("nircmd.exe win close class ""IEFrame"""), vbHide
elseif Args(0)="H" then
WshSHell.Run("nircmd.exe win hide class ""IEFrame"""), vbHide
elseif Args(0)="S" then
WshSHell.Run("nircmd.exe win show class ""IEFrame"""), vbHide
elseif Args(0)="A" then
WshSHell.popup vbcrlf&"工具栏增强工具 For Internet Explorer 版 By baomaboy"&vbcrlf&vbcrlf&vbcrlf&CloseTime & " 秒钟后本窗口将自动关闭!开始演示窗口透明及其他效果。" &vbcrlf&vbcrlf&"Copyright(C)  " & Copyright &"   " & QQ &"   " + Email, CloseTime, InsTitle +" - "+ Copyright, 0 + 64
count=255
WScript.Sleep 2000
WshSHell.popup vbcrlf&"所有IE窗口透明渐变效果!(目前不要操作鼠标和键盘)"&vbcrlf&vbcrlf&vbcrlf&CloseTime & " 秒钟后本窗口将自动关闭!" &vbcrlf&vbcrlf&"Copyright(C)  " & Copyright &"   " & QQ &"   " + Email, CloseTime, InsTitle +" - "+ Copyright, 0 + 64
WshSHell.Run("nircmd.exe win max class ""IEFrame"""), vbHide
For i=1to 50
count=count-5
WScript.Sleep 90
WshSHell.Run("nircmd.exe win trans ititle ""internet explorer"" "&count), vbHide
next
WScript.Sleep 500
count=5
For i=1to 50
count=count+5
WScript.Sleep 90
WshSHell.Run("nircmd.exe win trans ititle ""internet explorer"" "&count), vbHide
next
WScript.Sleep 2000
WshSHell.popup vbcrlf&"所有IE窗口最小/大化效果!(目前不要操作鼠标和键盘)"&vbcrlf&vbcrlf&vbcrlf&CloseTime & " 秒钟后本窗口将自动关闭!" &vbcrlf&vbcrlf&"Copyright(C)  " & Copyright &"   " & QQ &"   " + Email, CloseTime, InsTitle +" - "+ Copyright, 0 + 64
For i=1to 3
WScript.Sleep 1000
WshSHell.Run("nircmd.exe win min class ""IEFrame"""), vbHide
WScript.Sleep 1000
WshSHell.Run("nircmd.exe win max class ""IEFrame"""), vbHide
next
WScript.Sleep 2000
WshSHell.popup vbcrlf&"所有IE窗口隐藏/显示效果!(目前不要操作鼠标和键盘)"&vbcrlf&vbcrlf&vbcrlf&CloseTime & " 秒钟后本窗口将自动关闭!" &vbcrlf&vbcrlf&"Copyright(C)  " & Copyright &"   " & QQ &"   " + Email, CloseTime, InsTitle +" - "+ Copyright, 0 + 64
For i=1to 3
WScript.Sleep 1000
WshSHell.Run("nircmd.exe win hide class ""IEFrame""")
WScript.Sleep 1000
WshSHell.Run("nircmd.exe win show class ""IEFrame""")
next
WScript.Sleep 2000
WshSHell.Run("nircmd.exe win max class ""IEFrame""")
WScript.Sleep 8000
WshSHell.Run("nircmd.exe win close class ""IEFrame"""), vbHide
end if
else
WScript.Quit(0)
end if
End IF
Set WshSHell = Nothing
Set FSO = Nothing
Set Args = Nothing
WScript.Quit(0)

sub alltovbs()
'any2vbs→
end sub

 

[ Last edited by baomaboy on 2008-3-25 at 12:56 AM ]



好多菩提树,好多明镜台。本来好多物,好多的尘埃。
2007-4-29 17:41
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
flyinspace
银牌会员





积分 1206
发帖 517
注册 2007-3-25
状态 离线
『第 4 楼』:  

谢了,脚本已收藏。。

         睡觉去先。。。明天接着研究代码:)



知,不觉多。不知,乃求知
2007-4-29 17:55
查看资料  发短消息 网志   编辑帖子  回复  引用回复
eech
高级用户




积分 906
发帖 346
注册 2006-7-10
状态 离线
『第 5 楼』:  

虽然不用,还是佩服楼主

2007-4-30 23:21
查看资料  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: