Jump to content

my first gui calc


 Share

Recommended Posts

addition

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>
GuiCreate("addition", 392, 322,(@DesktopWidth-392)/2, (@DesktopHeight-322)/2 )

$Button_1 = GuiCtrlCreateButton("---->click here<----", 90, 20, 150, 20)
$Button_2 = GuiCtrlCreateButton("---->click here<----", 90, 70, 150, 20)
$Button_3 = GuiCtrlCreateButton("_-~calculate ~-_", 110, 140, 110, 40)
$Button_4 = GuiCtrlCreateButton("<----back", 10, 10, 80, 20)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
                MsgBox(0, "are you sure?", "are you sure you would like to exit? click ok below")
$1 = InputBox("exit?", "type yes to exit or if not just close this box")
if $1 = "yes" then ExitLoop
    Case $msg = $button_1
        $input = InputBox("addition", "type 1 number below to be added")
        if @error then ContinueLoop
            GUICtrlSetData($button_1,$input)
            Case $msg = $button_2
        $iinput = InputBox("addition", "type 1 number below to be added")
        if @error then ContinueLoop
            GUICtrlSetData($button_2,$input)
            Case $msg = $button_3
        $messege = MsgBox(0,"", $input + $iinput)
        if @error then ContinueLoop
                Case $msg = $button_4
            Run("calculater.exe")
                ExitLoop
            if @error then ContinueLoop
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---
Link to comment
Share on other sites

subtraction

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>
GuiCreate("subtraction", 392, 322,(@DesktopWidth-392)/2, (@DesktopHeight-322)/2 )

$Button_1 = GuiCtrlCreateButton("---->click here<----", 90, 20, 150, 20)
$Button_2 = GuiCtrlCreateButton("---->click here<----", 90, 70, 150, 20)
$Button_3 = GuiCtrlCreateButton("_-~calculate ~-_", 110, 140, 110, 40)
$Button_4 = GuiCtrlCreateButton("<----back", 10, 10, 80, 20)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
                MsgBox(0, "are you sure?", "are you sure you would like to exit? click ok below")
$1 = InputBox("exit?", "type yes to exit or if not just close this box")
if $1 = "yes" then ExitLoop
Case $msg = $button_1
        $input = InputBox("subtracted", "type 1 number below to be subtracted")
        if @error then ContinueLoop
            GUICtrlSetData($button_1,$input)
            Case $msg = $button_2
        $iinput = InputBox("subtracted", "type 1 number below to be subtracted")
        if @error then ContinueLoop
            GUICtrlSetData($button_2,$input)
            Case $msg = $button_3
        $messege = MsgBox(0,"", $input - $iinput)
        if @error then ContinueLoop
        Case $msg = $button_4
            Run("calculater.exe") 
            ExitLoop
            if @error then ContinueLoop
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---
Link to comment
Share on other sites

multiplacation

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>
GuiCreate("multiplacation", 392, 322,(@DesktopWidth-392)/2, (@DesktopHeight-322)/2 )

$Button_1 = GuiCtrlCreateButton("---->click here<----", 90, 20, 150, 20)
$Button_2 = GuiCtrlCreateButton("---->click here<----", 90, 70, 150, 20)
$Button_3 = GuiCtrlCreateButton("_-~calculate ~-_", 110, 140, 110, 40)
$Button_4 = GuiCtrlCreateButton("<----back", 10, 10, 80, 20)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
                MsgBox(0, "are you sure?", "are you sure you would like to exit? click ok below")
$1 = InputBox("exit?", "type yes to exit or if not just close this box")
if $1 = "yes" then ExitLoop
    Case $msg = $button_1
        $input = InputBox("multiplacation", "type 1 number below to be multiplied")
        if @error then ContinueLoop
            GUICtrlSetData($button_1,$input)
            Case $msg = $button_2
        $iinput = InputBox("multiplacation", "type 1 number below to be multiplied")
        if @error then ContinueLoop
            GUICtrlSetData($button_2,$input)
            Case $msg = $button_3
        $messege = MsgBox(0,"", $input * $iinput)
        if @error then ContinueLoop
        Case $msg = $button_4
            Run("calculater.exe")
                ExitLoop
            if @error then ContinueLoop
            
        ;;;
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---
Link to comment
Share on other sites

division

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>
GuiCreate("division", 392, 322,(@DesktopWidth-392)/2, (@DesktopHeight-322)/2 )

$Button_1 = GuiCtrlCreateButton("---->click here<----", 90, 20, 150, 20)
$Button_2 = GuiCtrlCreateButton("---->click here<----", 90, 70, 150, 20)
$Button_3 = GuiCtrlCreateButton("_-~calculate ~-_", 110, 140, 110, 40)
$Button_4 = GuiCtrlCreateButton("<----back", 10, 10, 80, 20)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
                    MsgBox(0, "are you sure?", "are you sure you would like to exit? click ok below")
$1 = InputBox("exit?", "type yes to exit or if not just close this box")
if $1 = "yes" then ExitLoop
    Case $msg = $button_1
        $input = InputBox("division", "type 1 number below to be divided")
        if @error then ContinueLoop
            GUICtrlSetData($button_1,$input)
            Case $msg = $button_2
        $iinput = InputBox("division", "type 1 number below to be divided")
        if @error then ContinueLoop
            GUICtrlSetData($button_2,$input)
            Case $msg = $button_3
        $messege = MsgBox(0,"", $input / $iinput)
        if @error then ContinueLoop
                Case $msg = $button_4
            Run("calculater.exe")
                ExitLoop
            if @error then ContinueLoop
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---
Link to comment
Share on other sites

calculater

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>
GuiCreate("CalCUlaTEr", 392, 322,(@DesktopWidth-392)/2, (@DesktopHeight-322)/2)

$Button_1 = GuiCtrlCreateButton("multiplacation", 100, 40, 170, 20)
$Button_2 = GuiCtrlCreateButton("division", 100, 70, 170, 20)
$Button_3 = GuiCtrlCreateButton("addition", 100, 100, 170, 20)
$Button_4 = GuiCtrlCreateButton("subtraction", 100, 130, 170, 20)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
                MsgBox(0, "are you sure?", "are you sure you would like to exit? click ok below")
$1 = InputBox("exit?", "type yes to exit or if not just close this box")
if $1 = "yes" then ExitLoop
Case $msg = $button_1
    run("multiplacation.exe")
                ExitLoop
            if @error then ContinueLoop
Case $msg = $button_2
    Run("division.exe")
        ExitLoop
        if @error then ContinueLoop
Case $msg = $button_3
    run("addition.exe")
        ExitLoop
            if @error then ContinueLoop
Case $msg = $button_4
    Run("subtraction.exe")
        ExitLoop
            if @error then ContinueLoop
EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...