一起学习网 一起学习网


用vbscript实现隐藏任务栏图标的脚本

网络编程 用vbscript实现隐藏任务栏图标的脚本 06-22
Message = "To work correctly, the script will close" & vbCR
  Message = Message & "and restart the Windows Explorer shell." & vbCR
  Message = Message & "This will not harm your system." & vbCR & vbCR
  Message = Message & "Continue?"
  X = MsgBox(Message, vbYesNo, "Notice")
  If X = 6 Then
  On Error Resume Next
  Dim WSHShell, n, MyBox, p, t, errnum, vers
  Dim itemtype
  Dim enab, disab, jobfunc
  Set WSHShell = WScript.CreateObject("WScript.Shell")
  p = "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerNoTrayItemsDisplay"
  itemtype = "REG_DWORD"
  enab = "ENABLED"
  disab = "DISABLED"
  jobfunc = "Notification Icons are now "
  t = "Confirmation"
  Err.Clear
  n = WSHShell.RegRead (p)
  errnum = Err.Number
  if errnum <> 0 then
   WSHShell.RegWrite p, 0, itemtype
  End If
  If n = 0 Then
   n = 1
  WSHShell.RegWrite p, n, itemtype
  Mybox = MsgBox(jobfunc & disab & vbCR, 4096, t)
  ElseIf n = 1 then
   n = 0
  WSHShell.RegWrite p, n, itemtype
  Mybox = MsgBox(jobfunc & enab & vbCR, 4096, t)
  End If
  Set WshShell = Nothing
  On Error GoTo 0
  For Each Process in GetObject("winmgmts:"). _
   ExecQuery ("select * from Win32_Process where name='explorer.exe'")
   Process.terminate(0)
  Next
  MsgBox "Finished." & vbcr & vbcr , 4096, "Done"
  Else
  MsgBox "No changes were made to your system." & vbcr & vbcr, 4096, "User Cancelled"
  End If

vbs正则表达式代码
%FunctionRegExpTest(patrn,strng)DimregEx,Match,Matches'建立变量。SetregEx=NewRegExp'建立正则表达式。regEx.Pattern=patrn'设置模式。regEx.IgnoreCase=True'设置是否区分字符大小

vbs版IP地理位置查询小偷
msg="请输入你要查询的IP或域名:"IP=Inputbox(msg,"IP地理位置查询小偷")IfIP=""ThenIP="127.0.0.1"url="http://www.ip.cn/?q="&IP&""Body=getHTTPPage(url)SetRe=NewRegExpRe.Pattern="(查询

超级厉害的VBS定时提醒脚本 Remind.vbs
'/*========================================================================='*Intro定时提醒,格式:时间|提示语,具体使用方法可以参考例子'*FileNameRemind.vbs'*Authoryongfa365'


编辑:一起学习网

标签:地理位置,小偷,你要,请输入,正则表达式