Snapshot only works with (0)

Started by domvalle@comcast.net, October 13, 2025, 10:25:34 AM

Previous topic - Next topic

domvalle@comcast.net

Using the example from the WIL documentation and also the tech database, Snapshot only works with (0)
if I use 1,2, or 3 it produces a 1KB file with no image?
Hmmm, what could be going wrong?
thanks you.

domvalle@comcast.net

OK, tried on a different system with a single monitor and request (3) did work this time!
hmmm...

domvalle@comcast.net

OK, not exactly, subsequent tries capture the entire screen again.
So when I run Snapshot(2) from a shortcut or taskbar.exe it shows Program Manager as the current window.
hmm,
   I'm trying to capture the current app window on screen before running the Snapshot but even if I do a winactivate before it writes a 1KB output file which cannot be read.

td

Works as expected on my Windows 11 dual screen workstation. Keep in mind that executing a script from the taskbar can change the current active window.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

domvalle@comcast.net

ok, well since snapshot or sendkey (alt+Printscreen) would only work with a full screen capture, I found this free app called ShareX.

ShareX w/Alt+PrtScr is able to reliably capture the active screen only and then we use BinaryClipGet to save he bmp file and send it to paint for printing, ...mspaint /pt filename will auto print.

Whew, so it is 2 steps, Alt-PrtScr then click WBscript icon to print.

...Wanted a single click but can live with the 2 steps

SMF spam blocked by CleanTalk