BatFrame – A Framework for Batch

This Project is not complete, and in-Progress.

BatFrame is the solution for all those, who want to quickly start creating amazing projects with the power of Scripting. And, it is a slap on the face of those – who think,

  • CMD/Batch scripting is not that powerful and limited to the std of 90s.
  • It is difficult to create basic UI things in batch/CMD Scripting.

With this project, our team has put a lot of effort to simplify the methods for users to correctly implement the use of various elements in their professional batch projects.

Quick Start

The Basic Frame that you need to understand in any scripting project is that it executes from Top-to-Bottom. And, on reaching the last line – the script will end on its own. To Make a GUI/User Desktop app, you need to wait for user input in the loop (in the end) and do actions according to user clicks/key presses.

[Start/setup of project]
[Loading/creating/showing Elements to show on screen]
[Waiting for userInput and doing stuff accordingly]
Goto :Uinput

Now as the Pseudo-code has been explained properly. Let’s Jump into the Basic Start Point of a Batch/DOS-Desktop-App Script. You can also generate a project Code & Folder structure by using FnC Function, I created that to make things easy for everyone – who loves to script in batch.

Main Script File – Sample

@Echo off
SetLocal EnableDelayedExpansion

Title [Title of your Desktop App]
Set "Path=%Path%;%LocalAppdata%;%cd%;%cd%\files"
Set "_Current_Page=1"

REM Here Code to Disable QUICK-EDIT feature
Disable Quick Edit

Call LoadPage 


Goto :Uinput

In the Code above, each Screen with elements like buttons, textfields, Menubars etc. that user sees on CMD console – it called as a PAGE. and, each page can be created/designed separately as separate files with the use of tools created by Batch-man or manually.

Add Buttons

You need to install Button Function 2.0 in your system. You can do that with Official BatCenter Package manager tool by Batch-Man team.

REM Here Code to Disable QUICK-EDIT feature
Call Button [X] [Y] [Color] "[ButtonText]" [X1] [Y1] [Color1] "[Button1Text]" .... X _Button_Code _Button_Hover_Color

Install Button Function with BatCenter

Bat Install Button 

Add Text Fields

You need to install Text Field Function in your system. You can do that with Official BatCenter Package manager tool by Batch-Man team.

Call GetText [X] [Y] [Color] "[PlaceHolder]" [X1] [Y1] [Color1] "[Button1Text]" .... X _TField_Code _TField_Hover_Color

Install TextField Function with BatCenter

Bat Install GetText

My Notes

The following tools are in my list to be included as a standard tools of usage for the framework users.

  1. Batbox by darkbatcher
  2. Getinput by aacini
  3. Batool by anic17
  4. batcenter by kvc
  5. button by kvc
  6. menubar by kvc
  7. table by kvc
  8. PixelDraw by kvc & D3nX
  9. InsertBmp by misol101
  10. cmdbkg by misol101