📄 hookfile.bas
字号:
Attribute VB_Name = "hookfile"
Dim buftxt As String
Global mypid As Long
Public Sub NotificationReceipt(ByVal wParam As Long, ByVal lParam As Long)
'If Foldpath = a2 Then GoTo run01:
'Exit Sub
run01:
Dim sOut As String
Dim sDisplayname1 As String
Dim sDisplayname2 As String
Dim shns As SHNOTIFYSTRUCT
MoveMemory shns, ByVal wParam, Len(shns)
If shns.dwItem1 Then
sDisplayname1 = GetDisplayNameFromPIDL(shns.dwItem1)
End If
If shns.dwItem2 Then
sDisplayname2 = GetDisplayNameFromPIDL(shns.dwItem2)
End If
'MsgBox Foldpath
sOut = SHNotify_GetEventStr(Foldpath & "\" & sDisplayname1, Foldpath & "\" & sDisplayname2, lParam)
Dim txt1 As String
txt1 = sOut
If txt1 = "" Then Exit Sub
If buftxt <> txt1 Then
gui.AddTextData txt1, 0
buftxt = txt1
If "建立文件 文件名:" = left(txt1, 9) Then
PlaySound App.Path & "\gwf1.wav", 0, &H1
If MsgBox(txt1 & " 是否删除", 32 + vbYesNo + vbSystemModal) = vbYes Then
MsgBox sDisplayname1
DeleteFile sDisplayname1
End If
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -