Loop and Flow Actions|
START LOOP . . command block . . NEXT LOOP |

*Tip:
Be sure to use the Auto-Indent and Validate command
with scripts that use Loops and IF statements.
It will help your script be more readable and reliable.
|
Start 'For' Loop
Start 'While' Loop


Start Text Loop
Start Files Loop
*Tip:
This action is most useful when using wildcard file searches:
|
Start File Line Loop
Start Folders Loop
Start Windows Loop
Start Dataset Loop



Start Registry Loop

| *Tip: Use caution when working with the Registry. Improper use of the Registry can make your computer non-functional! If you are not familiar with the Registry settings, do not change or delete them. |
Start Process Loop

Break out of Loop
NEXT LOOP
Label
GOTO Label
GOSUB Label


Return from GOSUB
Set Run Repeats
Exit Run

|
TEST.BAT
@echo off rem Display the return code and check if positive: vTask.exe /r Myfile.vxm rem (you could also run a compiled EXE:) Myfile.exe echo The return code was %ERRORLEVEL% rem How to check if the return code was positive: if ERRORLEVEL 1 echo PASSED rem How to check for a specific number: if %ERRORLEVEL% EQU 1234 echo PASSED rem How to take a path based on return code: goto answer%ERRORLEVEL% :answer0 echo Program had return code 0 goto end :answer1 echo Program had return code 1 goto end :end echo done! |
Exit vTask Studio