Giter Site home page Giter Site logo

dbohdan / messagebox Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 2.0 23 KB

Display message boxes from Windows batch files and command line programs

License: MIT License

Makefile 6.88% Batchfile 25.54% C 23.16% Shell 44.42%
windows batch batch-file gui dialog cli

messagebox's Introduction

Batch MessageBox

AppVeyor CI build status

This is a tiny hack to display message boxes from Windows batch files and command line programs. There are many like it but I didn't find any that was open source, non-copyleft and had no external dependencies like the .NET Framework.

Another goal of this project is to create a framework that makes building a simple Windows program with MinGW and running the tests for it surprisingly easy and pleasant. Never mind that; use MSYS2. (The old build scripts are preserved in the branch mingw.)

Binary downloads

You can download a prebuilt .exe file from the Releases page on GitHub.

Use example

@echo off
chcp 65001 > nul
set MB_YESNO=4
set MB_ICONQUESTION=32
set MB_ICONINFORMATION=64
set IDYES=6
set /a type=%MB_YESNO% + %MB_ICONQUESTION%
messagebox "Shall we play a game?" "Helpful Computer" %type%
if "%ERRORLEVEL%"=="%IDYES%" messagebox "What a cliché answer!" "Helpful Computer" %MB_ICONINFORMATION%

See demo.cmd for more.

Build requirements

Install MSYS2 then start the 32-bit MinGW shell (with C:\msys32\mingw32.exe or C:\msys64\mingw32.exe in an up-to-date MSYS2 installation) and run the following commands:

pacman --sync --noconfirm git make mingw-w64-i686-gcc wget
git clone http://github.com/dbohdan/messagebox
cd messagebox
make
make sendkey.exe # Download sendkey.exe and verify its checksum.
make test

License

MIT.

messagebox's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.