Merge Lines in VBScript (Windows)

If you need to have multiple commands in one line in MS Windows' VBScript, you can accomplish that by using the colon (:) operator. The following line of script will display two message-boxes after each other:

Msgbox"Hello." : Msgbox"Hey!"

You can leave as much space as you want between the commands and the colon.

Leave a Comment