@SNAPSHOT?

May 20, 2008
10,624
81
Syracuse, NY, USA
I have UpdateTitle=No and TITLEPROMPT=%[_4ver]$s$s[%_pid]$s$s$p.
How do I get a snapshot of the console? These fail:
Code:
p:\4sysutils> echo %@snapshot["%_wintitle"]
TCC: (Sys) The parameter is incorrect.
 "%@snapshot["17.00  [5956]  p:\4sysutils"]"

p:\4sysutils> echo %@snapshot["%_wintitle",1]
TCC: (Sys) The parameter is incorrect.
 "%@snapshot["17.00  [5956]  p:\4sysutils",1]"
 

rconn

Administrator
Staff member
May 14, 2008
11,926
133
Not reproducible; it's working here. (Including with "%_wintitle".)

The only time @snapshot returns a "parameter is incorrect" result is if it can't find the window. @snapshot also supports fuzzy matching or a PID instead of a window title. Try it with %_pid.
 
May 20, 2008
10,624
81
Syracuse, NY, USA
It works with =%_PID but I get an image of a console with the caption "foo" (apparently left over from about an hour ago when I tried
Code:
title foo & echo %@snapshot["%_winntitle"]
Do you use both SetWindowText and SetConsoleTitle in various places (and they do the same thing)?
 
May 20, 2008
10,624
81
Syracuse, NY, USA
ACTIVATE can find "%_wintitle". Here's the whole thing again.
Code:
v:\> option UpdateTitle
UpdateTitle=No

v:\> set titleprompt
%[_4ver]$s$s[%_pid]$s$s$p

v:\> echo %_wintitle
17.00  [6844]  v:\

v:\> echo %@snapshot["%_wintitle",1]
TCC: (Sys) The parameter is incorrect.
 "%@snapshot["17.00  [6844]  v:\",1]"

v:\> echo %@snapshot[%_wintitle,1]
TCC: (Sys) The parameter is incorrect.
 "%@snapshot[17.00  [6844]  v:\,1]"