TheBATeam is again back with an awesome batch plugin. Input is a simple to use utility/plugin that will help you in getting both mouse and keyboard input together. You can use this for getting the normal interaction of the user with your personal hobby programming projects.
As we all know, that almost from the last decade we (batch programmers) are using the same plugins or similar plugins to get user interaction with our created programs.
Getting Keyboard and Mouse Inputs Together – Input PLugin
As we all came across some of the famous plugins such as Batbox.exe, Fn.dll, Bg.exe, colous.exe, etc, In batch programming. And, if you’ve created some of your awesome batch projects using these plugins, then you are not different from #TheBATeam. We’ve also created some amazing batch programs using these awesome and reliable plugins.
Also, we’ve got a request from KKZiomek, (another awesome batch programmer) – but we have not got the pleasure of including any of his good batch projects in our blog yet. But we’ll try to do so. He has asked us for:
A Batch plugin, which can detect mouse hovering effect in batch programs - we were already working on Input.exe Plugin at that insctance of time. So, It was a good opportunity for TheBATeam to fulfill it.
And after reading his request, it seems to us as one post can accomplish both tasks. So, we’ve included his request in this post also.
Mouse and keyboard input together
Back to our talk. As now, if we will not update ourselves, we’ll always be the same as from the last 10 years. To take batch programming to a new level, we need to update our tools, which we are using to create awesome programs.
That’s why, #TheBATeam has created an awesome and reliable, plugin using CPP language. Which can only do one task, i.e. To Detect the User input Type, and which Input he/she has given.
As from the above two images, you’ve got a little idea about the working of this batch plugin. We needed to create this plugin in order to make things easier in batch programming. As all the available plugins make our scope limited for getting user input. In other words, We can Either Take mouse input or Keyboard input.
As you’ve seen – some of my older batch projects uploaded on this blog – they are either totally mouse-based programs, or totally keyboard-based. So, This is a kind of limitation in batch programming. That we definitely need to fix.
Eliminating Bulky & Unnecessary Code
So, In the ERA of #TheBATeam, we are presenting this awesome Batch Plugin, which will make the life of all batch programmers easy, As now there is no need of doing multi-threading in order to get both mouse and keyboard input simultaneously.
You only need to call this plugin once via your batch program, similarly as you are calling other plugins to get user input. The plugin will take care of multi-threading itself.
You can also get the mouse hovering details via using this plugin in a loop. Below is the Download link, we’ve provided an example file which will show you simply how to use it for showing hovering effect in the batch programs.
As now you almost know everything about this Awesome Batch plugin, but you still don’t know about its full usage. So, Let’s have a look at its HELP menu.
As most of the details are given in the image above, and we can’t explain things more than that. You’ll also get an ‘Example.bat‘ file as always with our downloads where you can test this plugin out. Here, We wanna explain a thing that is not given in the help menu. i.e. The Output
The Output – INPUT Plugin by Kvc
Basically, we’ve considered that only two types of inputs are possible in windows, i.e. Mouse and Keyboard Input. (Our assumption for making this plugin work) .
Although there can be many other types of inputs, which can be given to windows. But, we kept our focus only on these basic and standard inputs so that our batch program can easily interact with the user.
Above, You’ve seen two types of output that Input.exe plugin can return. Corresponding to two types of inputs that a user can give. i.e. Keyboard and mouse input in CMD. Let’s talk about both of them separately.
Detecting – The Keyboard input
When the user presses any key via keyboard, e.g. ‘K‘. Then the plugin will return the following kind of output.
- Here, First ‘k‘ represents that the user has given input via Keyboard.
- And, Second ‘K‘ represents the key pressed on the keyboard.
- The last parameter will tell you the ASCII Code for the key pressed.
As in some of the previous plugins, (like Batbox) they return the ASCII Code instead of character. So, this plugin contains both properties. You can use anyone, either key directly or its ASCII Code in your program.
DETECTING – The Mouse input
When the user presses any key via mouse, e.g. ‘Left Click‘. Then the plugin will return the following kind of output.
- Here, First ‘m‘ represents that the user has given input via Mouse.
- And, Second ‘1’ represents the key pressed on the Mouse.
- The last parameter will tell you the X & Y Co-ordinates of the mouse clicking location on CMD console.
From Editor’s Desk
That’s all from our side. We hope, we’ve explained everything in order to make it easy to use this plugin. If you still have any doubts about using it – Do a Comment. We’ll try to help you out.
HASH Code - For Verification - (SHA-256)
Keep learning, keep sharing….TheBATeam
Be happy, spread happiness…