WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: domvalle@comcast.net on October 13, 2025, 10:25:34 AM

Title: Snapshot only works with (0)
Post by: domvalle@comcast.net on October 13, 2025, 10:25:34 AM
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.
Title: Re: Snapshot only works with (0)
Post by: domvalle@comcast.net on October 13, 2025, 12:45:10 PM
OK, tried on a different system with a single monitor and request (3) did work this time!
hmmm...
Title: Re: Snapshot only works with (0)
Post by: domvalle@comcast.net on October 13, 2025, 02:03:27 PM
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.
Title: Re: Snapshot only works with (0)
Post by: td on October 13, 2025, 02:59:08 PM
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.