Read Mode

Batbox - An Awesome Batch Plugin | By DarkBatcher

Batbox - An Awesome Batch Plugin | By DarkBatcher
By DarkBatcher

Hey Hello guys, we are back again. But this time not with any new Batch program or Batch Plugin / Extension, but with some thoughts on a pre-existed plugin named as "Batbox.exe". This post will provide you with Information on Usage of Batbox.exe and our experience of using this batch plugin in our various batch projects. So, let's start with its maker. As you can see above in the title of this Article. The Batbox.exe Plugin is created by Mr. DarkBatcher. Who seems to me as one of the top rated batch programmer out there on web among Honguito98,Judago ... We can say about him this much, only because of his work, in the field of Batch Programming.

He Has created this awesome batch plugin using the knowledge of VB and ASM languages. He combined both, (VB is used for compiling the ASM Code of batbox to executable file.) the programming languages to result it into a beautiful creation of about only 1.5 KBs. Which not only smaller in size, but also faster in response. These qualities makes Batbox.exe a better and one of the Top Batch plugin on our list of plugins. It makes your batch porgrams smaller and faster, what else a programmer needs out of a plugin?

Batbox - An Awesome Batch Plugin | By DarkBatcher
The Dos9 Project

We've searched very deeply on the internet, but couldn't find anything about him. So, we are sorry for this issue. But, we've came across one of his best batch projects called "dos9 project". He has encoded a separate platform in order to reduce limitations of batch programming. Which We personally think is a good project. You can click on the image or its caption to go to their page. Or you can simply search 'The dos9 Project' on google, and it will lead you to their official Page.

We personally thank Mr. DarkBatcher from the depth of our heart for making and sharing such an Awesome Batch plugin with all of us. The Plugin itself is very smaller and 'All in one' plugin, i.e. It contains almost all of the batch parameters that are necessary and important. The main feature of this plugin is that it  can take multiple parameters in single go. e.g. All the possible parameters it can take, we can execute them in just a single line. And it will execute them without any delay in the execution or printing / calculation. Let's Talk about the Basic usage of the Batbox Plugin. 

Batbox Usage
BatBox is an external command that allows graphical interface and mouse input in the batch programs. It is a great utility which enables complex output printing console screen in an instance of second. It allows making the batch programs dynamic and can move cursor at any location in just few milli-seconds. In simple words, Batbox allows to manage console screen in a program.

We've also used Batbox in many of our great batch projects, just to dynamically manage the things on the console window.

There are Basically two types of syntax's that Batbox can Understand. One is Modern syntax and other one is classical syntax. The modern one is shorter and efficient then the classical one. SO, let's have a look at both syntax's.  
  • BATBOX [/d Text] [/g X Y] [/c Color] [/m] [/k[_]] [/a Character] [/w Duration] [/f State] [/s File] [/o OffsetX OffsetY] [/h Mode] [/p Mode] ...
  • BATBOX [/disp text] [/goto X posY] [/color col] [/mouse] [/key[_]] ...

Following is the List of Parameters it can take: (as shown above in the syntax)
  • /d or /disp: Displays required text on the console. After printing required text it doesn't move cursor to new line as ECHO command does. And it also not displays special characters. It shows simple ASCII text on the console.
    e.g. Batbox /d "This is simple Text."
  • /g or /goto: Changes cursor position to a required location on the console. Column and line numbers are starting form 0,0 from the top-left corner of the console window.
    e.g. Batbox /g PosX PosY

  • /c or /color: This parameter changes the color of console Locally, Not like the COLOR command, which changes the color of console Globally. which means, the color of the text printed after this parameter will be changed only. But not for the whole text on the console.
    e.g. Batbox /c 0x[ColorCode]
    e.g. Batbox /c 0x0A      [For Green colored text on black background]

  • /m or /mouse: Gets a user click from the console. It waits for the user click on the console and outputs the String like, X:Y:Type. It needs to be used in FOR Loop in order for getting proper and standard functioning of the plugin. Let's see an example below:
    FOR /F "tokens=1,2,3 delims=:" %%A in ('BatBox /m') DO (
      SET _Click=%%C
      SET _Y=%%B
      SET _X=%%A
    Type: has 4 possible values:

    : left click
    2 : right click
    3 : left double-click (returns first a left click)
    4 : right double-click (returns first a right click)
  • /k[_] or /key[_]: Gets a user keystroke from the console. It waits for the user keystroke from the keyboard and returns the result in the Environment variable '%errorlevel%'. If you'll use /k_ instead for simple /k, then the console will not stop but will pass the control to next code if no key is pressed as '0'. i.e. Errorlevel == 0.
    e.g. Batbox /k
  • /a : Similar to the /d switch or parameter, there we specify string to print on console, But here we can specify the ASCII Code of the character to print on the console.
    e.g. Batbox /a 97    [Prints 'a' on the console]
  • /w : Used for delay in the program. It stops the program for a specified number of milli-seconds.
    e.g. Batbox /w 1000    [Stops console for 1 Sec.]
  • /f : Allows to change console's window mode via program. i.e. allows programmer to make cmd fullscreen via the batch coding. we've noticed that, this parameter is little buggy in the plugin as it works fine in Windows XP and Windows 10 [Tested]. But Don't seems to work in windows 7. So, keep this thing in mid while using it any of your batch programs.
    e.g. Batbox /f [mode]        [Mode can have values either: 1: Full-screen / 2:Windowed]
  • /s : Plays a wav file. You can simply play music simultaneously using Multi-threading tricks, as used by Honguito98 in many of his Batch Games. but he used fn.dll for that purpose, instead of batbox.exe.
    e.g. Batbox /s [Path of wav file]
  • /o : Shifts console's original origin (0,0) form Top-Left corner to any other specified point on the console. We've used this awesome switch of Batbox in many of our batch projects, specially in Plot FunctionTypography Function, Box Function v.3.0 etc. You can have a look to know its true Potential.
    e.g. Batbox /o 
    OffsetX OffsetY
  • /h : Hides or shows the console blinking cursor. Very useful in GUI programs, where you don't wanna prompt user to type anything and then blinking cursor on the screen seems awkward. So, Hiding it is the only option for us.
    e.g. Batbox /h [Mode]     
    [Mode can have values either: 0:Hidden / 1:Visible]
  • /p : Changes console's windows mode, similar to /f but different in functioning. This switch allows programmer to minimize or maximize the console window via programming. It can take multiple mode values. Take a look at following Table.
    e.g. Batbox /p [Mode]

    [Mode can have following values:]
    0 : 
    Hides the window.
    1 : Activate and show the window, restoring it to its original size. This value should not be used because it's reserved to first call to show window. You should use value 9 instead.
    2 : Activate the window and minimizes it (show it in task bar).
    3 : Activate the window and make it maximized.

    4 : Shows the window restored to its original size. Same result as value 1, except that the window does not obtain focus.
    5 : Activate the window without modifying it.
    6 : Minimizes the window and activate another window.
    7 : Minimizes the window. Same result as value 2 except that the window is not activated.
    8 : Shows the window without modifying it. Same result as value 1, except that the window does not obtain focus.
    9 : Activate the window and set its size and its position to the initial values if the window was either maximized or minimized.
    10 : Show the windows and set its size and its position to the default values.
    11 : Minimizes the windows, even if the command prompt does not respond. This value is not supposed to be used, as it would be surprising that BatBox continue running even if the command prompt does not respond.
That's all about Batbox.exe Plugin By DarkBatcher. You can download the full description given above from the Link Given Below. The Link to download the Batbox plugin is also given separately in the Download link section. If you want to see the official explanation of using Batbox.exe Plugin by DarkBatcher. Then you can Click on this link... It will lead you to the official page of Batbox Usage explained.

If you are still in doubt, or you've used it in any of your batch programs and wanted to share your experiences. You can happily comment it in the comment 
field below. Thanks for reading.

Keep learning, keep sharing…
Be happy, spread happiness…

Download Link:

Batbox Plugin [Usage]
Batbox plugin [.exe]


No comments:

Powered by Blogger.