WinBatch Console Multiline Mode

 

Multiline mode allows you to enter a multiple WIL script lines at the WinBatch Console prompt without executing each line when you press the return key to begin a new line. This is useful for creating compound block statements like for loops or structured if blocks in the WinBatch Console environment but it can be used for almost any series of WIL statements.  

 

 

 

WinBatch Console

Console Keyboard Shortcuts

Cout

Cin

User Defined Commands

 

 

 

 

Enabling Multiline Mode

There are two ways to place the console into multiline mode.  You can enable multiline mode by placing the colon (:) character as the last character on the current prompt line.  The line can contain the first statement you wish to have the interpreter execute or it can be an empty line.

You can also paste script lines from the Windows clipboard into the console by pressing the Ctrl+v key combination.  The console will detect multiple lines in the clipboard  text and automatically place the console in multiline mode.

Using either method, the console changes the command prompt to an ellipses or three dots (...) to visually indicate that it is in multiline mode.

Entering Statements

Once in multiline mode continue entering statements one at a time much as you would when typing a script into a WinBatch Studio document windows.  Press the Enter Key  when you have finished typing a statement to begin a new statement on the next line.  

Once in multiline mode do not place a colon at the end off any subsequent lines.  The WIL interpreter may consider it illegal syntax.

Leaving Multiline Mode

As with entering there are two ways to leave multiline mode and return to single statement entry mode.  Press the Enter Key twice while the console entry cursor is on the last line you entered to have the WIL interpreter process your script.  The console will return to the WB prompt once the script completes.  It displays any errors and output from the Cout command above the WB prompt.

Press the Escape Key to leave multiline entry mode without executing the entered script lines. The console prompt changes back to the WB prompt but your work is not completely lost. Your typed-in lines remain in the history buffer and they can be retrieved one at a time using the Up and Down Arrow Keys.