Read Mode

How to Create 'MenuBar' on CMD Console | MenuBar Function 1.0

Create 'MenuBar' on CMD Console | MenuBar Function 1.0: I'm always amazed by the Fact that - How a Complicated thing can be turned into Simple thing by applying some techniques. And, Tricks and techniques are the things that makes us different from all the other animals of the animal kingdom. Our Way of thinking, decides 'How much we gonna learn & Survive in life'. So, That's why - we are going to talk about another great Batch Plugin - for making your batch programs more advance. But, with very less effort. Indirectly - this plugin is also another approach of TheBATeam to make things simpler and easy in computer programming.
How to Create 'MenuBar' on CMD Console | MenuBar Function 1.0

What is this MenuBar Function?

The MenuBar Function is another Portable Batch Function, Created by Kvc. Which helps in making Simple and easy MenuBars in Your Batch programs by less lines of coding. It takes us one step ahead in the goal of making Batch an Easy and Effective GUI Language for programming. The menubar will be Mouse click enabled and you can add as many menu options & Sub Menu Options in the Output. It is quite fascinating Function.
How to Create 'MenuBar' on CMD Console | MenuBar Function 1.0

What are its features?

MenuBar Function 1.0 is quite large batch file with file size of 6 Kbs, And it is created by Kvc. It uses List Function to Show the Sub-menu options. So, It’s a Hell lot of Dynamism in such a limited environment of Batch programming.
  • Simple to Use and Understand. (only 2 parameters)
  • Reduces a lot of the efforts of the main programmer.
  • Adds a lot of GUI in your Programs in only two lines of Code.
  • Flexible enough – for using with the List Function 1.0 or 2.0.
As the days are passing, more and more batch plugins are being collected in one place. And, That opportunity of using all of them in an innovative way is increasing. We’re almost near to creating a proper environment of Plugins / Functions to make almost every job in Batch easier and possible.

The Example of Combining Menubar Function with the List Function and other Sub Plugins – shows the power and dynamics of the program. You can update it anytime, just by replacing the older plugins with the newer versions. Without even changing the main code. And, your program will get updated.
Also Read: Can Powershell Replace CMD in Windows?
We’ve done it – while changing the List function 1.0 with List Function 2.0 in the Menubar function, and didn’t changed a bit of code at all. And, the output became Mouse Hover Enabled automatically. Just because – List function 2.0 Allows it. J I Hope, We’ll reach up to our goal of Easy and advanced Programming language soon.

How to use it?

The usage of Menubar Function 1.0 is a little complex to understand. But, its implementation is tremendously easy. You need to know few things to use it. And, All the complex output you gonna display on CMD will be handled by only 2 lines of Code. But, Before that you need to have a look at the complex nature of its working. After this you’ll better understand its behavior and this will help you out in your next batch projects. You can implement similar techniques too.

How to Create 'MenuBar' on CMD Console | MenuBar Function 1.0
The Usage Syntax is Quite small, as I’ve already told you. It takes only 2 Parameters. And, All else is handles by the function itself. You may need to watch the video in order to understand more about it. It explains everything about My Creation and its usage in a simpler way. (Demo Video is Embedded at End)

What is that DataBase File – in MenuBar Function?

The Database file is a Simple Text File (We prefer simple things those are obviously - easy to understand for all). Which takes all the options starting from ‘#’ as Comments. You can add anything after writing the element ‘#’ (Hash).
Simplicity is the ultimate sophistication.
-Leonardo da Vinci
But, From the First line – that starts without ‘#’. The Function assumes it as a Menu Option. And, If you want to add few Sub-options under that Menu Option – You can do so. You need to write ‘$’ (Dollar) Sign Before the Text of Sub-Menu option. And, You don’t need to leave space between the $ and the Text. You’ll get the better understanding by the following example. Try to Recall these three Main Points about Database Files for MenuBar.

  •  All Comments starts from ‘#’.
  • All Sub-Menu Options Starts from ‘$’.
  • All Text without any special symbol – i.e. # or $ are Main Menu Options.

For Example:
# This file is just an Example.
$Save As

You can write as many elements as you want. But, Do keep in mind the width of the console screen too. The Main Menu options will be added in the CMD and Sub-option will appear as soon as you’ll click on any of the Main menu option.

Watch the following video carefully – for proper understanding of the usage of it in your Batch Programs. It will definitely help you in understanding more.

So, Now You understand the Need and Function of Auto-GeneratedCheck_Menubar_Click.bat Function. It helps in saving your programming time and adds additional Dynamism in the Main Batch Program. It helps in understanding the concept of StaticVs. Dynamic Programming too. That’s the power of making flexible Programs – as they make your Creations flexible too.
Software is like Sex,
Its Better, When its Free
-Linus Torvalds
That’s enough for this session. I Hope – That you’ve understood the concept and can easily use it in your batch programs. For any doubt, Bug, Problem – Or APPRECIATION. We’re always open in the comment field. Thanks for reading this far. The article is becoming a book now. So, I’m going to finishing it up here. Thanks for your time. Happy Coding!

Keep Learning, Keep Sharing...
Be Happy, Spread Happiness...


  1. Amazing work!!!!
    i love it... 😍😍😍😍😍

    1. Thanks for your humble feedback Chahat! It's your comments that keep us motivated to continue our glamorous works.


Powered by Blogger.