Skip to content

Instantly share code, notes, and snippets.

@WebFreak001
Created December 23, 2021 12:45
Show Gist options
  • Save WebFreak001/69893b9b09f9a67ee0d677957e5d4909 to your computer and use it in GitHub Desktop.
Save WebFreak001/69893b9b09f9a67ee0d677957e5d4909 to your computer and use it in GitHub Desktop.
flashy
import core.sys.windows.windows;
import std.random;
extern(Windows) int x(HWND w, LPARAM lparam) nothrow
{
FLASHWINFO f;
f.cbSize = f.sizeof;
f.hwnd = w;
f.dwFlags = 7;
try { f.dwTimeout = uniform(300, 2000); }
catch (Exception e) { assert(false); }
FlashWindowEx(&f);
return TRUE;
}
void main()
{
EnumWindows(&x, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment