Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
Kurt6716052
3 discussion posts
Dear sirs,
I am quite moron with programming, but I managed to write a macro that suits my needs.:D
The only thing I am missing is a command to close the "Quick History menu".
That means, I am trying to do the opposite of "BFS.Clipboardfusion.ShowQuickHistoryMenu()".
I suspect I am missing something obvious :).
Thank you and regards !
May 27, 2022  • #1
User Image
Kurt6716052
3 discussion posts
I tried this, but i doesn't work.

Code

using System;
using System.Collections.Generic;
IntPtr handle;
if( IsClipboardManagerOpen(out handle) )
{
// Close the ClipboardManager
BFS.Window.Close(handle);
}
// This isn't the
private static bool IsClipboardManagerOpen(out IntPtr handle)
{
handle = IntPtr.Zero;
// Loop through all visible windows and look for a window with the right title that is run by the ClipboardFusion process
foreach(IntPtr window in BFS.Window.GetVisibleWindowHandles())
{
if(BFS.Window.GetText(window).IndexOf("ClipboardFusion", StringComparison.OrdinalIgnoreCase) != 0)
continue;
if(BFS.Application.GetMainFileByWindow(window).IndexOf("clipboardfusion.exe", StringComparison.OrdinalIgnoreCase) == -1)
continue;
// Set the handle to the window we found
handle = window;
return true;
}
// If we got this far, that means we didn't find anything
return false;
}
May 28, 2022 (modified May 28, 2022)  • #2
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Try this out :)

Code

IntPtr window = BFS.Window.GetWindowByText("Clipboard Manager*");
BFS.Window.Close(window);
May 31, 2022 (modified May 31, 2022)  • #3
User Image
Kurt6716052
3 discussion posts
It worked after some tuning : the window title was different due to foreign langage.

Thanks so much for reply, it will save my time.
May 31, 2022  • #4
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries, glad to hear it!
Jun 1, 2022  • #5
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)