While ... WEnd

Repeat a block of statements.

Syntax 
      While condition 
         [Statements]
      WEnd

Key
   condition   An expression that evaluates to True or False

   Statements  Program code to be executed if condition is True

Example

endLoop = DateAdd("s",10,Time())
While Time() < endLoop
   WScript.Echo "This line will repeat for 10 seconds"
Wend

“Don’t ask what the world needs. Ask what makes you come alive, and go do it. Because what the world needs is people who have come alive” ~ Howard Thurman

Related:

If..Then - Conditionally execute a block of statements
Select...Case - Conditional execution of a block of code
Do..Loop - Repeat a block of statements
Equivalent PowerShell cmdlet: While


 
Copyright © SS64.com 1999-2019
Some rights reserved