'====== VBS ======
' Очистить корзину
'===== Flasher © =
Option Explicit: Dim RBin, Old, Par, Str, i, L, Title, A
Set RBin = CreateObject("Shell.Application").NameSpace(10)
With CreateObject("Scripting.FileSystemObject")
Old = .GetFileVersion(.GetSpecialFolder(1) & "\shell32.dll") < "6.0.6"
If Old Then Par = 625 : Str = 6 Else Par = 1050 : Str = 8
If RBin.Items.Count = 1 Then
If .FileExists(RBin.Items.Item(0).Path) Then
If Old Then Par = 1042 : Str = 9 Else Par = 1055 : Str = 13
Else
If Old Then Par = 1043 : Str = 3 Else Par = 1056 : Str = 4
End If
End If
End With
RBin.Self.InvokeVerb "Empty"
With CreateObject("CDO.Message").AddAttachment("res://shell32.dll/6/" & Par).GetDecodedContentStream
.Type = 1
For i = 0 To Str
L = AscB(.Read(2)) * 2 : If L > 0 Then Title = CStr(.Read(L))
Next
End With
With CreateObject("WScript.Shell")
Do : A = .AppActivate(Title) : Loop Until A
WSH.Sleep 10 : .SendKeys "~"
End With
While RBin.Items.Count : WSH.Sleep 400 : Wend
Set RBin = Nothing |