----- Original Message -----
From: "djspits" <>
| I didn't understand Vince' remarks. Which window is changed by TCC
immediately after startup?
If the directive UpdateTitle is set to YES in TCC, it changes its own title
to match the command it currently executes by appending it to the original
title, and dropping ot when the command is completed. With your options
(i.e., ignore all startup controls, use parent's options) the time between
creating a new instance and executing the first command (which with the /C
option is the only command) is minimal.
|
| However, it did make me wonder if perhaps the opposite was true. Namely
that I was trying to catch a window that hasn't had it's default TCC title
changed yet by START.
|
| The following code now works.
|
|
| Code:
| ---------
|
| OPTION //UpdateTitle=No
|
| START "Job starting..." /PGM "%_CMDSPEC" /IPSX /C "%@UNQUOTE[%executable]"
| DELAY 1
| ACTIVATE "Job starting*" "Executing job %_STARTPID"
|
| ECHO Started: %executable as %_STARTPID
| ---------
|
| I have two closing questions left:
| 1) Is the OPTION really necessary?
I think not, because the (temporary) changes are appended to the title, so
the wildcard in the searched after title in ACTIVATE will find it anyway.
Furthermore, you can put the option into the START command itself, so your
interactive session can continue updating its own title:
START "Job starting..." /PGM "%_CMDSPEC" /IPSX //UpdateTitle=No /C
"%@UNQUOTE[%executable]"
| 2) How would you implement a loop that waits for the window to become
visible before using ACTIVATE to rename it? The DELAY seems a brittle
solution.
For that very reason at my request Vince added the WAITWIN command to his
sysutils.dll plugin. You can use that command instead. If you loaded the
plugin, use its SYSHELP command for more details.
--
HTH, Steve