1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Take Command V10 @WINPID suggestion.

Discussion in 'Support' started by dcantor, Jan 7, 2009.

  1. dcantor

    Joined:
    May 29, 2008
    Messages:
    505
    Likes Received:
    3
    Here's what I found:

    [C:\Program Files\JPSoft\TCMD10]echo %@winpid[Process Explorer*]
    2244

    That happens to be right. (It would be nice if the help file said that wild cards were allowed. )

    [C:\Program Files\JPSoft\TCMD10]echo %@winpid[Process Explorer]
    TCC: (Sys) The parameter is incorrect.
    "%@winpid[Process Explorer]"
    It would be better if @WINPID returned -1 if a window with a matching name is not found. Then it could be tested fairly easily as
    SET MYWINPID=%@WINPID[My application title]
    IF %MYWINPID LT 0 QUIT 3
    or something like that.

    I like most of the new features. (I don't dislike any of them.)

    I look forward to a stable version -- I'll be able to remove a bunch of kludges I have in my batch files, mostly related to PIDs of other processes, testing if particular things are running, etc.
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    dcantor wrote:
    | Here's what I found: [C:\Program Files\JPSoft\TCMD10]echo
    | %@winpid[Process Explorer*] 2244 That happens to be right. (It
    | would be nice if the help file said that wild cards were allowed. )
    | [C:\Program Files\JPSoft\TCMD10]echo %@winpid[Process Explorer] TCC:
    | (Sys) The parameter is incorrect. "%@winpid[Process Explorer]" It
    | would be better if @WINPID returned -1 if a window with a matching
    | name is not found. Then it could be tested fairly easily as SET
    | MYWINPID=%@WINPID[My application title] IF %MYWINPID LT 0 QUIT 3
    | or something like that. I like most of the new features. (I don't
    | dislike any of them.) I look forward to a stable version -- I'll be
    | able to remove a bunch of kludges I have in my batch files, mostly
    | related to PIDs of other processes, testing if particular things are
    | running, etc.

    For some reason the above post was delivered to my mailbox as a single line
    (lines wrapped only by my mail client). It wasn't posted by chance from a
    *nix platform, was it?
    --
    Steve
     
  3. dcantor

    Joined:
    May 29, 2008
    Messages:
    505
    Likes Received:
    3
    Good heavens, no! For some reason I still don't understand, my first attempt to post resulted in the version you received by email. I edited it a few minutes later to one with real line breaks (though I don't know if everyone can see it that way). I wish we were using a newsgroup.
     

Share This Page