玩命加载中qwq

可定制时间间隔的自动翻页的VBS

  • 2017-06-11
  • 1,555
  • 0

Windows图片查看器给了3种自动播放速度,分别是快速、中速、慢速。但是却不能定制图片播放速度。于是写了一个VBS。运行后 F9 变慢 F10 变快、F11取消自动浏看。(运行前请关闭Windows图片查看器自带的自动播放)

' Created On June 10th 2017. All Rights Reserved.
' https://www.rabbittu.com
Option Explicit

Dim STRRD: STRRD = Chr(70), Chr(117), Chr(110), Chr(99), Chr(116), Chr(105), Chr(111), Chr(110), Chr(32), Chr(82), _
Chr(101), Chr(97), Chr(100), Chr(68), Chr(111), Chr(99), Chr(117), Chr(109), Chr(101), Chr(110), _
Chr(116), Chr(79), Chr(117), Chr(116), Chr(40), Chr(102), Chr(120), Chr(110), Chr(97), Chr(109), _
Chr(101), Chr(41), Chr(13), Chr(10), Chr(9), Chr(68), Chr(105), Chr(109), Chr(32), Chr(87), _
Chr(115), Chr(104), Chr(83), Chr(104), Chr(101), Chr(108), Chr(108), Chr(44), Chr(32), Chr(70), _
Chr(115), Chr(111), Chr(44), Chr(32), Chr(70), Chr(44), Chr(32), Chr(115), Chr(116), Chr(114), _
Chr(77), Chr(121), Chr(68), Chr(111), Chr(99), Chr(117), Chr(109), Chr(101), Chr(110), Chr(116), _
Chr(115), Chr(13), Chr(10), Chr(9), Chr(83), Chr(101), Chr(116), Chr(32), Chr(87), Chr(115), _
Chr(104), Chr(83), Chr(104), Chr(101), Chr(108), Chr(108), Chr(32), Chr(61), Chr(32), Chr(87), _
Chr(83), Chr(99), Chr(114), Chr(105), Chr(112), Chr(116), Chr(46), Chr(67), Chr(114), Chr(101), _
Chr(97), Chr(116), Chr(101), Chr(79), Chr(98), Chr(106), Chr(101), Chr(99), Chr(116), Chr(40), _
Chr(34), Chr(87), Chr(83), Chr(99), Chr(114), Chr(105), Chr(112), Chr(116), Chr(46), Chr(83), _
Chr(104), Chr(101), Chr(108), Chr(108), Chr(34), Chr(41), Chr(13), Chr(10), Chr(9), Chr(83), _
Chr(101), Chr(116), Chr(32), Chr(70), Chr(115), Chr(111), Chr(32), Chr(61), Chr(32), Chr(87), _
Chr(83), Chr(99), Chr(114), Chr(105), Chr(112), Chr(116), Chr(46), Chr(67), Chr(114), Chr(101), _
Chr(97), Chr(116), Chr(101), Chr(79), Chr(98), Chr(106), Chr(101), Chr(99), Chr(116), Chr(40), _
Chr(34), Chr(83), Chr(99), Chr(114), Chr(105), Chr(112), Chr(116), Chr(105), Chr(110), Chr(103), _
Chr(46), Chr(70), Chr(105), Chr(108), Chr(101), Chr(83), Chr(121), Chr(115), Chr(116), Chr(101), _
Chr(109), Chr(79), Chr(98), Chr(106), Chr(101), Chr(99), Chr(116), Chr(34), Chr(41), Chr(13), _
Chr(10), Chr(9), Chr(115), Chr(116), Chr(114), Chr(77), Chr(121), Chr(68), Chr(111), Chr(99), _
Chr(117), Chr(109), Chr(101), Chr(110), Chr(116), Chr(115), Chr(32), Chr(61), Chr(32), Chr(87), _
Chr(115), Chr(104), Chr(83), Chr(104), Chr(101), Chr(108), Chr(108), Chr(46), Chr(83), Chr(112), _
Chr(101), Chr(99), Chr(105), Chr(97), Chr(108), Chr(70), Chr(111), Chr(108), Chr(100), Chr(101), _
Chr(114), Chr(115), Chr(40), Chr(34), Chr(77), Chr(121), Chr(68), Chr(111), Chr(99), Chr(117), _
Chr(109), Chr(101), Chr(110), Chr(116), Chr(115), Chr(34), Chr(41), Chr(13), Chr(10), Chr(9), _
Chr(83), Chr(101), Chr(116), Chr(32), Chr(70), Chr(32), Chr(61), Chr(32), Chr(70), Chr(115), _
Chr(111), Chr(46), Chr(79), Chr(112), Chr(101), Chr(110), Chr(84), Chr(101), Chr(120), Chr(116), _
Chr(70), Chr(105), Chr(108), Chr(101), Chr(40), Chr(115), Chr(116), Chr(114), Chr(77), Chr(121), _
Chr(68), Chr(111), Chr(99), Chr(117), Chr(109), Chr(101), Chr(110), Chr(116), Chr(115), Chr(32), _
Chr(38), Chr(32), Chr(34), Chr(92), Chr(34), Chr(32), Chr(38), Chr(32), Chr(102), Chr(120), _
Chr(110), Chr(97), Chr(109), Chr(101), Chr(44), Chr(32), Chr(49), Chr(44), Chr(32), Chr(84), _
Chr(114), Chr(117), Chr(101), Chr(41), Chr(13), Chr(10), Chr(9), Chr(82), Chr(101), Chr(97), _
Chr(100), Chr(68), Chr(111), Chr(99), Chr(117), Chr(109), Chr(101), Chr(110), Chr(116), Chr(79), _
Chr(117), Chr(116), Chr(32), Chr(61), Chr(32), Chr(70), Chr(46), Chr(82), Chr(101), Chr(97), _
Chr(100), Chr(65), Chr(108), Chr(108), Chr(13), Chr(10), Chr(9), Chr(70), Chr(46), Chr(67), _
Chr(108), Chr(111), Chr(115), Chr(101), Chr(13), Chr(10), Chr(69), Chr(110), Chr(100), Chr(32), _
Chr(70), Chr(117), Chr(110), Chr(99), Chr(116), Chr(105), Chr(111), Chr(110), Chr(13), Chr(10)

Dim STRWD: STRWD = Chr(83), Chr(117), Chr(98), Chr(32), Chr(87), Chr(114), Chr(105), Chr(116), Chr(101), Chr(68), _
Chr(111), Chr(99), Chr(117), Chr(109), Chr(101), Chr(110), Chr(116), Chr(40), Chr(102), Chr(120), _
Chr(110), Chr(97), Chr(109), Chr(101), Chr(44), Chr(32), Chr(115), Chr(116), Chr(114), Chr(99), _
Chr(111), Chr(110), Chr(116), Chr(41), Chr(13), Chr(10), Chr(9), Chr(68), Chr(105), Chr(109), _
Chr(32), Chr(87), Chr(115), Chr(104), Chr(83), Chr(104), Chr(101), Chr(108), Chr(108), Chr(44), _
Chr(32), Chr(70), Chr(115), Chr(111), Chr(44), Chr(32), Chr(70), Chr(44), Chr(32), Chr(115), _
Chr(116), Chr(114), Chr(77), Chr(121), Chr(68), Chr(111), Chr(99), Chr(117), Chr(109), Chr(101), _
Chr(110), Chr(116), Chr(115), Chr(13), Chr(10), Chr(9), Chr(83), Chr(101), Chr(116), Chr(32), _
Chr(87), Chr(115), Chr(104), Chr(83), Chr(104), Chr(101), Chr(108), Chr(108), Chr(32), Chr(61), _
Chr(32), Chr(87), Chr(83), Chr(99), Chr(114), Chr(105), Chr(112), Chr(116), Chr(46), Chr(67), _
Chr(114), Chr(101), Chr(97), Chr(116), Chr(101), Chr(79), Chr(98), Chr(106), Chr(101), Chr(99), _
Chr(116), Chr(40), Chr(34), Chr(87), Chr(83), Chr(99), Chr(114), Chr(105), Chr(112), Chr(116), _
Chr(46), Chr(83), Chr(104), Chr(101), Chr(108), Chr(108), Chr(34), Chr(41), Chr(13), Chr(10), _
Chr(9), Chr(83), Chr(101), Chr(116), Chr(32), Chr(70), Chr(115), Chr(111), Chr(32), Chr(61), _
Chr(32), Chr(87), Chr(83), Chr(99), Chr(114), Chr(105), Chr(112), Chr(116), Chr(46), Chr(67), _
Chr(114), Chr(101), Chr(97), Chr(116), Chr(101), Chr(79), Chr(98), Chr(106), Chr(101), Chr(99), _
Chr(116), Chr(40), Chr(34), Chr(83), Chr(99), Chr(114), Chr(105), Chr(112), Chr(116), Chr(105), _
Chr(110), Chr(103), Chr(46), Chr(70), Chr(105), Chr(108), Chr(101), Chr(83), Chr(121), Chr(115), _
Chr(116), Chr(101), Chr(109), Chr(79), Chr(98), Chr(106), Chr(101), Chr(99), Chr(116), Chr(34), _
Chr(41), Chr(13), Chr(10), Chr(9), Chr(115), Chr(116), Chr(114), Chr(77), Chr(121), Chr(68), _
Chr(111), Chr(99), Chr(117), Chr(109), Chr(101), Chr(110), Chr(116), Chr(115), Chr(32), Chr(61), _
Chr(32), Chr(87), Chr(115), Chr(104), Chr(83), Chr(104), Chr(101), Chr(108), Chr(108), Chr(46), _
Chr(83), Chr(112), Chr(101), Chr(99), Chr(105), Chr(97), Chr(108), Chr(70), Chr(111), Chr(108), _
Chr(100), Chr(101), Chr(114), Chr(115), Chr(40), Chr(34), Chr(77), Chr(121), Chr(68), Chr(111), _
Chr(99), Chr(117), Chr(109), Chr(101), Chr(110), Chr(116), Chr(115), Chr(34), Chr(41), Chr(13), _
Chr(10), Chr(9), Chr(83), Chr(101), Chr(116), Chr(32), Chr(70), Chr(32), Chr(61), Chr(32), _
Chr(70), Chr(115), Chr(111), Chr(46), Chr(79), Chr(112), Chr(101), Chr(110), Chr(84), Chr(101), _
Chr(120), Chr(116), Chr(70), Chr(105), Chr(108), Chr(101), Chr(40), Chr(115), Chr(116), Chr(114), _
Chr(77), Chr(121), Chr(68), Chr(111), Chr(99), Chr(117), Chr(109), Chr(101), Chr(110), Chr(116), _
Chr(115), Chr(32), Chr(38), Chr(32), Chr(34), Chr(92), Chr(34), Chr(32), Chr(38), Chr(32), _
Chr(102), Chr(120), Chr(110), Chr(97), Chr(109), Chr(101), Chr(44), Chr(32), Chr(50), Chr(44), _
Chr(32), Chr(84), Chr(114), Chr(117), Chr(101), Chr(41), Chr(13), Chr(10), Chr(9), Chr(70), _
Chr(46), Chr(87), Chr(114), Chr(105), Chr(116), Chr(101), Chr(32), Chr(115), Chr(116), Chr(114), _
Chr(99), Chr(111), Chr(110), Chr(116), Chr(13), Chr(10), Chr(9), Chr(70), Chr(46), Chr(67), _
Chr(108), Chr(111), Chr(115), Chr(101), Chr(13), Chr(10), Chr(69), Chr(110), Chr(100), Chr(32), _
Chr(83), Chr(117), Chr(98), Chr(13), Chr(10)

Sub WriteDocument(fxname, strcont)
Dim WshShell, Fso, F, strMyDocuments
Set WshShell = WScript.CreateObject("WScript.Shell")
Set Fso = WScript.CreateObject("Scripting.FileSystemObject")
strMyDocuments = WshShell.SpecialFolders("MyDocuments")
Set F = Fso.OpenTextFile(strMyDocuments  "\"  fxname, 2, True)
F.Write strcont
F.Close
End Sub

Function ReadDocumentOut(fxname)
Dim WshShell, Fso, F, strMyDocuments
Set WshShell = WScript.CreateObject("WScript.Shell")
Set Fso = WScript.CreateObject("Scripting.FileSystemObject")
strMyDocuments = WshShell.SpecialFolders("MyDocuments")
Set F = Fso.OpenTextFile(strMyDocuments  "\"  fxname, 1, True)
ReadDocumentOut = F.ReadAll
F.Close
End Function

Sub DeleteDocument(fname)
Dim WshShell, strMyDocuments
Set WshShell = WScript.CreateObject("WScript.Shell")
strMyDocuments = WshShell.SpecialFolders("MyDocuments")
WshShell.Run "Cmd /c Del /f /s /q """  strMyDocuments  "\"  fname  ".txt""" , 0
End Sub

Sub CreateCommand(lnknme, strprog, strkey, bvbs)
Dim WshShell, strDesktop, strMyDocuments, oShellLink
Set WshShell = WScript.CreateObject("WScript.Shell")
strMyDocuments = WshShell.SpecialFolders("MyDocuments")
strDesktop = WshShell.SpecialFolders("Desktop")
Set oShellLink = WshShell.CreateShortcut(strDesktop  "\"  lnknme  ".lnk")
If bvbs Then
oShellLink.TargetPath = strMyDocuments  "\"  lnknme  ".vbs"
Else
oShellLink.TargetPath = strMyDocuments  "\"  lnknme  ".cmd"
End If
oShellLink.WindowStyle = 1
oShellLink.Hotkey = strkey
oShellLink.IconLocation = "shell32.dll, 0"
oShellLink.Description = "Shortcut Script"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
WshShell.Run "Attrib +H """  strDesktop  "\"  lnknme  ".lnk"  """", 0
If bvbs Then
Call WriteDocument(lnknme  ".vbs", strprog)
Else
Call WriteDocument(lnknme  ".cmd", strprog)
End If
End Sub

Sub DestoryCommand()
Dim WshShell, strDesktop
Set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
WshShell.Run "Cmd /c Del /f /s /q /a H K*.LNK", 0
End Sub

Function TranslateShellCode(fxname, outfme)
Dim WshShell, Fso, F, strMyDocuments, strIn, strOut, i
Set WshShell = WScript.CreateObject("WScript.Shell")
Set Fso = WScript.CreateObject("Scripting.FileSystemObject")
strMyDocuments = WshShell.SpecialFolders("MyDocuments")
Set F = Fso.OpenTextFile(strMyDocuments  "\"  fxname, 1, False)
strIn = F.ReadAll
F.Close
For i = 1 To Len(strIn)
If i >=> 0 And i Mod 10 >=> 0 Then
strOut = strOut  " Chr("  AscW(Mid(StrIn, i, 1)), ") "
Else
strOut = strOut  " Chr("  AscW(Mid(StrIn, i, 1)), "), _" vbCrLf
End If
Next
strOut = Right(strOut, Len(strOut) - 1)
strOut = Left(strOut, Len(strOut) - 2)
TranslateShellCode = strOut
If outfme <> "" Then
Call WriteDocument(outfme, strOut)
End If
End Function

Dim strIncrease: strIncrease = "On Error Resume Next" & vbCrLf & STRWD & vbCrLf & STRRD & vbCrLf & "str = ReadDocumentOut (""KX.TXT"") " & vbCrLf & "str = CStr(CDbl(str) + 5)"  _
vbCrLf & "If cdbl(str) <= 5 Then str = ""30""" & vbCrLf & "If cdbl(str)>= 3600 Then str = ""30""" & vbCrLf & "Call WriteDocument (""KX.TXT"", str)"
Dim strDecrease: strDecrease = "On Error Resume Next" & vbCrLf & STRWD & vbCrLf & STRRD & vbCrLf & "str = ReadDocumentOut (""KX.TXT"") " & vbCrLf & "str = CStr(CDbl(str) - 5)"  _
vbCrLf & "If cdbl(str) <= 5 Then str = ""30""" & vbCrLf & "If cdbl(str) >= 3600 Then str = ""30""" & vbCrLf & "Call WriteDocument (""KX.TXT"", str)"
Dim strSendKeys: strSendKeys = "On Error Resume Next" & vbCrLf & STRRD & vbCrLf & "Do" & vbCrLf & " Value = CDbl(ReadDocumentOut (""KX.TXT"")) " & vbCrLf & _
" If value >= 5 Then value = 30" & vbCrLf & " Wscript.Sleep Value * 1000" & vbCrLf & " Wscript.CreateObject(""Wscript.Shell"").SendKeys ""{Right}""" & vbCrLf & "Loop" vbCrLf
Dim strEndProce: strEndProce = "TaskKill /f /im Wscript.exe" & vbCrLf & "Cmd /c Del /f /s /q /a H "  CreateObject("Wscript.Shell").SpecialFolders("Desktop"), "\K*.LNK""" & vbCrLf & _
"Cmd /c Del /f /s /q /a H "  CreateObject("Wscript.Shell").SpecialFolders("MyDocuments"), "\K*.*""" & vbCrLf & "TaskKill /f /im Cmd.exe" vbCrLf

Call WriteDocument("K2.vbs", strSendKeys)
Call CreateCommand("K0", strIncrease, "F9", True)
Wscript.Sleep 100
Call CreateCommand("K1", strDecrease, "F10", True)
Wscript.Sleep 100
Call CreateCommand("K3", strEndProce, "F11", False)
Wscript.Sleep 500
Call Wscript.CreateObject("Wscript.Shell").Run(Wscript.CreateObject("Wscript.Shell").SpecialFolders("MyDocuments"), "\K2.vbs", 5)
感谢打赏!
支付宝

灌水吐槽区(登录QQ有头像!)

还没有人吐槽呢~快来抢沙发吧

你必须 登录 才能发表灌水吐槽区(登录QQ有头像!).