wwWendt.de

     

 

 

Tech » Freeware » Win32 » wait


Bitte beachten Sie die Hinweise!
Please read the disclaimer!

wait

Note: There are other free tools on the web with the same name.
They may run on Win3, 95, 98 and ME, but may only support waiting for a given time (not for a window caption or process).
I will rename my version on occasion.

Wartet auf ein Fenster, einen Prozess oder eine definierte Dauer. / Waits for a window, process, or fixed duration.

Win32 Console Application

Download wait.exe (Zip file 87kB)

S-creenshot

Beschreibung

Abstract

Console program that waits for a given condition. This is particularly useful in batch files that start a sequence of programs that depend on each other.

Duration: wait N seconds.

Window title: wait until a window is found, that conatins a given string in the caption.

Process name: wait until a process with a given name is running.

Process window: wait until a process with a given name is running and has an visible window open.

Systemanforderungen

Requirements

Windows XP or Windows NT >= 4 or Windows Server > 2000
Source was compiled on VVisualStudio 2005.

Installation

Installation

Copy/extract to any folder. (For easier access, add this folder to your PATH environment variable)

Anleitung

Usage

wait [OPTIONS] [<INPUT] [>OUTPUT]

Enter wait -? for a list of options.

Samples:

See below.
 

Known issues

This program uses psapi.dll, so it propably won't run on Windows 3.1, 95, 98 or ME.

Change Log and previous releases

2008-04-07
v1.0
Released

Help (wait -?)

cmd.exe
C:\Prj\cpp\wait\release>wait -?
wait v1.0 (c) 2008 martin@wwwendt.de  --  Apr  7 2008

Usage:
    wait SECONDS [OPTIONS] [MATCH, ...]

Options:
  -?        Print this help.
  -process  Wait until a process named MATCH is running.
  -procwin  Wait until a process named MATCH has a visible top-level window.
  -window   Wait for a visible top-level window title that contains MATCH.
            (This option is the default and may be omitted.)
  -q        Quiet mode.
  -p        Wait for [Enter] when done.
  -dump     Dump task list.

Examples:
> wait 2
    Wait 2 seconds.
> wait 10 "readme.txt - Editor"
    Wait until 'readme.txt' is open in the Windows Editor.
    Then return ERRORLEVEL 0. Timeout after 10 seconds with ERRORLEVEL 1.
> wait 0 "Mozilla Firefox"
    Check: return ERRORLEVEL 0, if Firefox is running. ERRORLEVEL 1 else.
> wait 10 -process firefox.exe iexplorer.exe
    Wait until Firefox OR Internet Explorer appear in the tasklist and
    return ERRORLEVEL 0.
    Timeout after 10 seconds with ERRORLEVEL 1.
> wait 10 -procwin firefox.exe
    Return ERRORLEVEL 0, when Firefox has a visible top-level window.
    Timeout after 10 seconds with ERRORLEVEL 1.

Matching is case-insensitive. If more than one MATCH is given, then OR is used.
Use double quotes (") if MATCH contains spaces.
Check the process list in the Task-Manager for the process name of a running
process.

Skript examples:
  Open a url and wait for the browser to open:
    START http://google.com/
    wait 10 "Google - "
  Start a server if neccessary, then open a url, when it runs:
    wait 0 -process nhttp.exe
    IF NOT ERRORLEVEL 1 GOTO FOUND
    start nhttp.exe
    wait 30 nhttp.exe
    wait 5
    :FOUND
    start http://localhost:8080/


C:\Prj\cpp\wait\release>_


TxtFilter « Wait » WinTail

Nach oben
 
     
     
     

hometopcontact
© martin wendt