----- Original Message -----
From: "djspits" <>
To: <
[email protected]>
Sent: 2010. May 31., Monday 11.37
Subject: RE: [Support-t-2004] Re: ACTIVATE doesn't find windows
| Thanks for the reply, Steve.
|
| You're quite right and I removed the MIN.
| But still no luck.
| I've tried everything I can think of.
|
| Here's my code again
|
|
| Code:
| ---------
|
| START "Starting" /PGM "%_CMDSPEC" /IS /IX /IP /C "%@UNQUOTE[%executable]"
| SET new_title=Executing %_STARTPID
| ACTIVATE "Starting" "%new_title"
| UNSET new_title
| ECHO Started: %executable as %_STARTPID
| DELAY 3
| ---------
|
| The delay is there because I also read in the helptext that the lifespan
of
| a new title is limitted to the lifespan of the changing batch? Is that
correct?
As Vince wrote, UNLESS you use directive UpdateTitle=No (one of the entries
in the Startup page of the OPTION dialog) the title will change rapdily,
ACTIVATE may not find it. However, its TCSTART file can issue a TITLE
command to set its own title to include its PID (and you must skip /IS
option; more below).
Vince's plugin sysutils.dll includes the WHICHWIN command, which (among
other things) can return the current title of a window when you have its
PID. You can use that to determine the title needed in the ACTIVATE command
if you do not want to use TCSTART.
Note that the suboptions of the /I option MUST be combined into a single
option, i.e., /IIPSX, not spread out as 3 separate arguments.
Last but not least: why do you need a spearate instance of TCC at all just
to run another program? It could be started directly with the START command.
--
HTH, Steve