Clipboard history. Topic is solved
-
- Posts: 20
- Joined: 11 Dec 2023, 15:10
Clipboard history.
First of all I would like to greet all the users of this forum.
I would like to kindly ask for help in order to delete the entire history of the clipboard without having to do it manually every time.
Before writing this request I tried to look for the solution in the previous post but I couldn't find anything.
I thank in advance anyone who can help me.
Regards.
Marco Gatti
I would like to kindly ask for help in order to delete the entire history of the clipboard without having to do it manually every time.
Before writing this request I tried to look for the solution in the previous post but I couldn't find anything.
I thank in advance anyone who can help me.
Regards.
Marco Gatti
Re: Clipboard history.
Check https://www.autohotkey.com/docs/v2/lib/A_Clipboard.htmMarco Gatti wrote: ↑11 Dec 2023, 15:48First of all I would like to greet all the users of this forum.
I would like to kindly ask for help in order to delete the entire history of the clipboard without having to do it manually every time.
Before writing this request I tried to look for the solution in the previous post but I couldn't find anything.
I thank in advance anyone who can help me.
Regards.
Marco Gatti
Last edited by MrDodel on 11 Dec 2023, 16:15, edited 1 time in total.
So much universe, and so little time. GNU Sir Terry.
Re: Clipboard history.
Try this -- Source -> here
Code: Select all
RunWait(A_ComSpec " /c echo | clip")
-
- Posts: 4389
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Clipboard history. Topic is solved
Code: Select all
#Requires AutoHotkey v2.0
if !ClearClipboardHistory() {
MsgBox 'Failed to clear clipboard history'
}
ClearClipboardHistory() {
static IID_IClipboardStatics2 := '{D2AC1B6A-D29F-554B-B303-F0452345FE02}'
, wrtClass := 'Windows.ApplicationModel.DataTransfer.Clipboard'
DllCall('Combase\WindowsCreateString', 'Str', wrtClass, 'UInt', StrLen(wrtClass), 'PtrP', &HSTRING := 0)
DllCall('Ole32\IIDFromString', 'Str', IID_IClipboardStatics2, 'Ptr', riid := Buffer(16))
DllCall('Combase\RoGetActivationFactory', 'Ptr', HSTRING, 'Ptr', riid, 'PtrP', IClipboardStatics2 := ComValue(VT_UNKNOWN := 13, 0))
DllCall('Combase\WindowsDeleteString', 'Ptr', HSTRING)
ComCall(ClearHistory := 7, IClipboardStatics2, 'UIntP', &res := 0)
return res
}
-
- Posts: 20
- Joined: 11 Dec 2023, 15:10
Re: Clipboard history.
First of all I wish everyone a good day.
With this message I would like to thank you for the quick replies that helped me resolve the problem.
Regards.
Marco Gatti
With this message I would like to thank you for the quick replies that helped me resolve the problem.
Regards.
Marco Gatti
-
- Posts: 4389
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Clipboard history.
Have a good day, too!
Re: Clipboard history.
anyone know to remove the last one only?
-
- Posts: 4389
- Joined: 29 Mar 2015, 09:41
- Contact: