Articles, Blog

Batch file: Calculator with mouse and GUI!

September 12, 2019


Siin on selle pakkfaili kood… Selle kalkulaatoriga saab teha lihtsat matemaatikat, salvestada, laadida ja kustutada arve. Samuti on võimalik arve mällu salvestada. See hoiab arvu isegi pärast pakkfaili sulgemist alles! Samuti on võimalik teemat salvestada. Kõik muudatused hoitakse pakkfaili sees. Allalaadimise link on kirjelduses!

You Might Also Like

10 Comments

  • Reply MarkusTegelane May 8, 2017 at 5:38 pm

    👍

  • Reply MrMan May 27, 2017 at 3:51 pm

    How do you program batch files with mouse capability

  • Reply Coc May 28, 2017 at 12:48 pm

    nice

  • Reply Mr. Toonster June 8, 2017 at 12:14 am

    Does not work, the GUI appears broken and I can't click anything, even with bg.exe in the folder.
    Norton falsely detects bg.exe as a virus so I had to restore it.

  • Reply Mr. Toonster June 14, 2017 at 2:13 am

    Good calculator program so far. I think more features could be added in the next version (scientific and programmer modes)

  • Reply Gamming Lab July 9, 2017 at 11:53 pm

    i am working on a calculater with batbox.exe soo if you can help me with the = botton ill be so happy 🙂
    this is the code:
    @echo off
    title
    mode 22 , 22
    if not exist batbox.exe goto :makeBatBox
    :calc
    batbox /g 0 1 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219
    batbox /g 0 2 /a 219 /a 219 /d " 1 " /a 219 /a 219 /d " 2 " /a 219 /a 219 /d " 3 " /a 219 /a 219 /d " / " /a 219 /a 219
    batbox /g 0 3 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219
    batbox /g 0 4 /a 219 /a 219 /d " 4 " /a 219 /a 219 /d " 5 " /a 219 /a 219 /d " 6 " /a 219 /a 219 /d " * " /a 219 /a 219
    batbox /g 0 5 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219
    batbox /g 0 6 /a 219 /a 219 /d " 7 " /a 219 /a 219 /d " 8 " /a 219 /a 219 /d " 9 " /a 219 /a 219 /d " – " /a 219 /a 219
    batbox /g 0 7 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219
    batbox /g 0 8 /a 219 /a 219 /d " 0 " /a 219 /a 219 /d " = " /a 219 /a 219 /d " + " /a 219 /a 219
    batbox /g 0 9 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219
    echo ²result = %data%
    batbox /g 0 11 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219 /a 219

    for /f "delims=: tokens=1,2" %%A in ('batbox /m') do (
    set x=%%A
    set y=%%B
    )

    if %y%==2 (
    if %x%==3 (
    set data=%data%1
    )
    if %x%==8 (
    set data=%data%2
    )
    if %x%==13 (
    set data=%data%3
    )
    if %x%==18 (
    set data=%data% /
    )
    )
    if %y%==4 (
    if %x%==3 (
    set data=%data%4
    )
    if %x%==8 (
    set data=%data%5
    )
    if %x%==13 (
    set data=%data%6
    )
    if %x%==18 (
    set data=%data% *
    )
    )
    if %y%==6 (
    if %x%==3 (
    set data=%data%7
    )
    if %x%==8 (
    set data=%data%8
    )
    if %x%==13 (
    set data=%data%9
    )
    if %x%==18 (
    set data=%data% –
    )
    )
    if %y%==8 (
    if %x%==3 (
    set data=%data%0
    )
    if %x%==11 (
    :: this is the = botton plz help with putting your ideas in the comments and thank you 🙂
    )
    )

    goto calc

    :makeBatBox
    for %%b in (
    4D5343460000000073030000000000002C000000000000000301010001000000
    00000000470000000100010000060000000000000000FE4259B5200062617462
    6F782E657865003FD9412724030006434BB5545F485361143F5737F0CF726B3A
    102ABB528B1EC24813421026D3529AB59C184460D7ED6EF7CE79EFB8F74A562F
    B1D543EF5143DC60483C27AF0C14248B18710A4979ECA40426A0329A1B21ECA
    AF73EE9D4E21B287FAB6DF77CFF99DF37DDFEF3B3B779D1752C001800D5CC018
    808F1C1C3ED879A41015FB9F56C064E942ED141758A8ED96649D4F6A6A4C1306
    8B0A028AAC1F789BC36A8F0B2C2B79E0DF1036A44ACDB557670638F601B4080
    E3A0C3FBFDDC06B7044EAE9CE34EA2283041C3B505A48E9E450079B99B69C05B
    FC4B1457BC75DD6666DECD8F981BE02EF71797FDC7A32E9A100C7C1EB1E505D9
    2CDD5BC7252AC57F1E92ABCA0771EB21D968029C98E76125D25F9967D1ED838C
    8372D6F24E093AD9175832FFADCAD43C7F8C459F9442D39D1E8C3947C6913F15
    7BB79A7BCD18CBA6D10BB24687B9E33226E4E6904E5DE37A9DE90A3C9C7926F1
    98F48C73E401F2CC731FBD66BAB2335D6E8689B0336A13E6798C76B601772CB6
    F7E2565EEAD64C1589A931C93092B34B2ECE4E1C6BB466EBE82C1DDD4E8A3ED3
    5ED25137B163B861AE9ED8B7D452F182D42F945F4D111213920E14F28B908D57
    B3C61233710903560539A9DA3CD0E257901F6EA600D664019744879B295EE44C
    3F43EF9BFD303A3FD172A61FE13CDABC17FD9BEBB39F5CD7DFD3BDEEF155565D
    6E63B4D8CC0E9EEF910E15745C5D47755EAB32AB245726A20A890C55275B4616
    52417A44035BA71FC8498670A970F3F77CCCD7E2862E3F524D44EBFBB6D741F
    3D46F7A4DF3847E885988B835574AF0EDE4893F9056F1874970F26101F111711
    B6DD3EA8411C472C20A611FD31211C8D0CA89737DAEC4665A1E532F8CA8DA13F
    ED2E7013682FBA7FDFA29DA11E7F57775D6B2000A7DBBACEB4051AEA4D077EE0
    2076E54833881E846488864FEB09DE2D8AAA2113222ED82124988E48744C3AF
    2ABA9A103BF17F6A3BD32D0E192D86A1C97D8386B82DE21FD474550BAABA6CC8
    AA42ABBA4421920F7628C941A385F213A298DCB6AE55D69309E18A79D40C6A9A
    47BC422C2356106B799D7F8AE16D345931A264F5C644232C9916990382AC085A
    4C475F1C920D93EFEF932C4B3734434D00FC02
    ) Do >>t.dat (Echo.For b=1 To len^("%%b"^) Step 2
    ECHO WScript.StdOut.Write Chr^(Clng^("&H"^&Mid^("%%b",b,2^)^)^) : Next)
    Cscript /b /e:vbs t.dat>batbox.ex_
    Del /f /q /a t.dat >nul 2>&1
    Expand -r batbox.ex_ >nul 2>&1
    Del /f /q /a batbox.ex_ >nul 2>&1
    goto :calc

  • Reply Adam Huml October 14, 2017 at 12:59 pm

    can I use this calculator to my new system MoonDos (you will be enrolled in the list of authors) ?

  • Reply Philip Smolik August 19, 2018 at 10:23 am

    And what about float value?? …

  • Reply Tigran's Tips December 20, 2018 at 5:18 pm

    I don't understand why it isn't working. Even some characters are missing

    System information:
    Screen Size: 16:9 1336×768
    Microsoft Windows [Version 10.0.17134.1]
    Operating System Type: Windows NT 10.0 x64 aka Windows 10 64-bit
    Processor Architecture: AMD64
    Processor Architecture (x64): Missing
    Processor ID: AMD64 Family 15 Model 67 Stepping 3, AuthenticAMD
    Processor Level: 15
    Processor Revision: 4303
    Number of Processors: 2
    Windows Location: C:Windows
    Highest NUMA Node Number for this computer: 0

  • Reply Minecraft Ciach June 3, 2019 at 4:59 pm

    Can I use the code to translate this calculator?

  • Leave a Reply