# Mini Calculator

## Recommended Posts

Calculator. My idia. It's work.

```#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("MustDeclareVars", 1)

Global \$Input, \$Btn1, \$Btn2, \$Btn3, \$Btn4, \$Btn5, \$Btn6, \$Btn7
Global \$Btn8, \$Btn9, \$Btn0, \$Btn_add, \$Btn_sub, \$Btn_mul
Global \$Btn_div, \$Btn_clear, \$Btn_dot, \$Btn_ans_com, \$Btn_ans_add
Global \$Btn_ans_sub, \$Btn_ans_mul, \$Btn_ans_div, \$nMsg, \$read

main()
Func main()
GUICreate("Mini Calculator", 305, 103, -1, -1, -1, _
BitOR(\$WS_EX_OVERLAPPEDWINDOW,\$WS_EX_TOPMOST,\$WS_EX_WINDOWEDGE))
\$Input = GUICtrlCreateInput("", 8, 8, 290, 21, _
BitOR(\$WS_EX_CLIENTEDGE,\$WS_EX_STATICEDGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
\$Btn1 = GUICtrlCreateButton("1", 8, 40, 27, 25, \$WS_GROUP)
\$Btn2 = GUICtrlCreateButton("2", 40, 40, 27, 25, \$WS_GROUP)
\$Btn3 = GUICtrlCreateButton("3", 72, 40, 27, 25, \$WS_GROUP)
\$Btn4 = GUICtrlCreateButton("4", 104, 40, 27, 25, \$WS_GROUP)
\$Btn5 = GUICtrlCreateButton("5", 136, 40, 27, 25, \$WS_GROUP)
\$Btn6 = GUICtrlCreateButton("6", 8, 72, 27, 25, \$WS_GROUP)
\$Btn7 = GUICtrlCreateButton("7", 40, 72, 27, 25, \$WS_GROUP)
\$Btn8 = GUICtrlCreateButton("8", 72, 72, 27, 25, \$WS_GROUP)
\$Btn9 = GUICtrlCreateButton("9", 104, 72, 27, 25, \$WS_GROUP)
\$Btn0 = GUICtrlCreateButton("0", 136, 72, 27, 25, \$WS_GROUP)
\$Btn_add = GUICtrlCreateButton("+", 176, 40, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
\$Btn_sub = GUICtrlCreateButton("-", 208, 40, 27, 25, \$BS_BOTTOM)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
\$Btn_mul = GUICtrlCreateButton("*", 176, 72, 27, 25, BitOR(\$BS_TOP,\$WS_GROUP))
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
\$Btn_div = GUICtrlCreateButton("/", 208, 72, 27, 25)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
\$Btn_clear = GUICtrlCreateButton("c", 240, 40, 58, 25)
GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif")
\$Btn_dot = GUICtrlCreateButton(".", 240, 72, 27, 25, \$BS_BOTTOM )
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
\$Btn_ans_com = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
\$Btn_ans_add = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_sub = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_mul = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_div = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, \$GUI_HIDE)
GUISetState(@SW_SHOW)

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
Case \$Btn1
Case \$Btn2
Case \$Btn3
Case \$Btn4
Case \$Btn5
Case \$Btn6
Case \$Btn7
Case \$Btn8
Case \$Btn9
Case \$Btn0
Case \$Btn_dot
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_sub
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_mul
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_div
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_ans_sub
Case \$Btn_ans_mul
Case \$Btn_ans_div
Case \$Btn_clear
GUICtrlSetState(\$Btn_ans_com, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
ContinueLoop
EndSwitch
WEnd
EndFunc```

Edited by sak
##### Share on other sites

I think it's a good effort. The only thing I miss is not being able to type or paste the number into the input.

##### Share on other sites

I think it's a good effort. The only thing I miss is not being able to type or paste the number into the input.

Thank you for helping to slant

A single look.

Do not know what will work or not.

##### Share on other sites

Not as mini as mine I made a ridiculously small calculator years ago which was about 120x20 pixels, and was literally a bar which you typed in one side and got the answer out the other.

You also picked exactly the same name for it as I did... I thought this was my thread for a moment being resurrected like my other thread that was brought back from 2009 today

##### Share on other sites

sak

```Do
Until Not Assign('sString', Eval('sString')) Or Not Assign('sString', InputBox('Calc', \$sString & " = " & Execute(\$sString), \$sString)) Or \$sString = ''```

##### Share on other sites

Thank you for guidance.

```#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("MustDeclareVars", 1)

HotKeySet("{ESC}", "send_close")
HotKeySet("1", "send_1")
HotKeySet("2", "send_2")
HotKeySet("3", "send_3")
HotKeySet("4", "send_4")
HotKeySet("5", "send_5")
HotKeySet("6", "send_6")
HotKeySet("7", "send_7")
HotKeySet("8", "send_8")
HotKeySet("9", "send_9")
HotKeySet("0", "send_0")
HotKeySet(".", "send_dot")
HotKeySet("{-}", "send_sub")
HotKeySet("{*}", "send_mul")
HotKeySet("{/}", "send_div")
HotKeySet("{BS}", "send_back")
HotKeySet("{DEL}", "send_clear")

Global \$Input, \$Btn1, \$Btn2, \$Btn3, \$Btn4, \$Btn5, \$Btn6, \$Btn7
Global \$Btn8, \$Btn9, \$Btn0, \$Btn_add, \$Btn_sub, \$Btn_mul
Global \$Btn_div, \$Btn_clear, \$Btn_dot, \$Btn_ans_com, \$Btn_ans_add
Global \$Btn_ans_sub, \$Btn_ans_mul, \$Btn_ans_div, \$nMsg, \$read
Global \$title = "Mini Calculator", \$cid = "Edit1", \$sread, \$thim
Global \$sFile = @SystemDir&'\Calc.exe', \$hForm, \$sFile, \$Btn_back
main()
Func main()
\$hForm = GUICreate("Mini Calculator     (Esc=Exit)", 305, 103, -1, -1, -1, _
BitOR(\$WS_EX_OVERLAPPEDWINDOW,\$WS_EX_TOPMOST,\$WS_EX_WINDOWEDGE))
GUISetBkColor(0xA6CAF0)
GUISetIcon(\$sFile, -1, \$hForm)
\$Input = GUICtrlCreateInput("0", 8, 8, 290, 21, _
BitOR(\$WS_EX_CLIENTEDGE,\$WS_EX_STATICEDGE))
GUICtrlSetBkColor(-1, 0xFFFFFF)
\$Btn1 = GUICtrlCreateButton("1", 8, 40, 27, 25, \$WS_GROUP)
\$Btn2 = GUICtrlCreateButton("2", 40, 40, 27, 25, \$WS_GROUP)
\$Btn3 = GUICtrlCreateButton("3", 72, 40, 27, 25, \$WS_GROUP)
\$Btn4 = GUICtrlCreateButton("4", 104, 40, 27, 25, \$WS_GROUP)
\$Btn5 = GUICtrlCreateButton("5", 136, 40, 27, 25, \$WS_GROUP)
\$Btn6 = GUICtrlCreateButton("6", 8, 72, 27, 25, \$WS_GROUP)
\$Btn7 = GUICtrlCreateButton("7", 40, 72, 27, 25, \$WS_GROUP)
\$Btn8 = GUICtrlCreateButton("8", 72, 72, 27, 25, \$WS_GROUP)
\$Btn9 = GUICtrlCreateButton("9", 104, 72, 27, 25, \$WS_GROUP)
\$Btn0 = GUICtrlCreateButton("0", 136, 72, 27, 25, \$WS_GROUP)
\$Btn_add = GUICtrlCreateButton("+", 176, 40, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
\$Btn_sub = GUICtrlCreateButton("-", 208, 40, 27, 25, \$BS_BOTTOM)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
\$Btn_mul = GUICtrlCreateButton("*", 176, 72, 27, 25, BitOR(\$BS_TOP,\$WS_GROUP))
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
\$Btn_div = GUICtrlCreateButton("/", 208, 72, 27, 25)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
\$Btn_clear = GUICtrlCreateButton("c", 240, 40, 27, 25)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
\$Btn_back = GUICtrlCreateButton("BS", 270, 40, 27, 25)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
\$Btn_dot = GUICtrlCreateButton(".", 240, 72, 27, 25, \$BS_BOTTOM )
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
\$Btn_ans_com = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
\$Btn_ans_add = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_sub = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_mul = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_div = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, \$GUI_HIDE)
GUISetState(@SW_SHOW)

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
Case \$Btn1
Case \$Btn2
Case \$Btn3
Case \$Btn4
Case \$Btn5
Case \$Btn6
Case \$Btn7
Case \$Btn8
Case \$Btn9
Case \$Btn0
Case \$Btn_dot
Case \$Btn_back
GUICtrlSetData(\$Input, \$thim)
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_sub
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_mul
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_div
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_ans_sub
Case \$Btn_ans_mul
Case \$Btn_ans_div
Case \$Btn_clear
GUICtrlSetState(\$Btn_ans_com, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
ContinueLoop
EndSwitch
WEnd
EndFunc

Func send_1()

EndFunc

Func send_2()
EndFunc

Func send_3()
EndFunc

Func send_4()
EndFunc

Func send_5()
EndFunc

Func send_6()
EndFunc

Func send_7()
EndFunc

Func send_8()
EndFunc

Func send_9()
EndFunc

Func send_0()
EndFunc

Func send_dot()
EndFunc

Func send_back()
GUICtrlSetData(\$Input, \$thim)
EndFunc

GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_sub()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_mul()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_div()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_div, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_clear()
GUICtrlSetState(\$Btn_ans_com, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func enter()
WinWaitActive(\$title, "", 1)
Send("{ENTER}")
EndFunc

Func send_num_1()
EndFunc

Func send_num_2()
EndFunc

Func send_num_3()
EndFunc

Func send_num_4()
EndFunc

Func send_num_5()
EndFunc

Func send_num_6()
EndFunc

Func send_num_7()
EndFunc

Func send_num_8()
EndFunc

Func send_num_9()
EndFunc

Func send_num_0()
EndFunc

Func send_num_dot()
EndFunc

GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_num_sub()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_num_mul()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_num_div()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_div, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_close()
Exit
EndFunc```

##### Share on other sites

Hi,

I like it. !!!!

Here is another version using the 'execute' command

```#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
\$Form1 = GUICreate("Form1", 233, 350, 255, 147)
GUISetBkColor(0xA6CAF0)
\$Input1 = GUICtrlCreateInput("", 40, 104, 145, 21)
\$Input2 = GUICtrlCreateInput("", 40, 144, 145, 21)
\$Label1 = GUICtrlCreateLabel("                                              ", 16, 32, 200, 29)
GUICtrlSetFont(-1, 16, 800, 0, "Bell MT")
GUICtrlSetBkColor(-1, 0xFFFFFF)

\$Label2 = GUICtrlCreateLabel("C", 0, 38, 15, 29) ;<<C>>
GUICtrlSetFont(-1, 16, 800, 0, "Bell MT")

\$Label3 = GUICtrlCreateLabel("A", 20, 104, 15, 21) ;<<A>>
GUICtrlSetFont(-1, 16, 800, 0, "Bell MT")

\$Label3 = GUICtrlCreateLabel("B", 20, 144, 15, 21) ;<<b>>
GUICtrlSetFont(-1, 16, 800, 0, "Bell MT")

\$Root = GUICtrlCreateButton("Root", 10, 208, 50, 25, \$WS_GROUP)
\$recip = GUICtrlCreateButton("Recip", 60, 208, 50, 25, \$WS_GROUP)
\$Mult = GUICtrlCreateButton("Mult", 110, 208, 50, 25, \$WS_GROUP)
\$Div = GUICtrlCreateButton("Div", 160, 208, 50, 25, \$WS_GROUP)
\$Sub = GUICtrlCreateButton("Sub", 60, 180, 50, 25, \$WS_GROUP)
\$Per = GUICtrlCreateButton("%", 110, 180, 50, 25, \$WS_GROUP)
\$Sin = GUICtrlCreateButton("Sin", 160, 180, 50, 25, \$WS_GROUP)
\$Clr = GUICtrlCreateButton("Clr", 10, 234, 50, 25, \$WS_GROUP)
\$rad2deg = GUICtrlCreateButton("r2d", 60, 234, 50, 25, \$WS_GROUP)
\$c2a = GUICtrlCreateButton("c2a", 110, 234, 50, 25, \$WS_GROUP)
\$c2b = GUICtrlCreateButton("c2b", 160, 234, 50, 25, \$WS_GROUP)
\$Pi = GUICtrlCreateButton("PI", 10, 260, 50, 25, \$WS_GROUP)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Global \$a = 0, \$b = 0, \$c = 0
Func display()
\$Label1 = GUICtrlCreateLabel(\$c, 16, 32, 200, 29)
GUICtrlSetFont(-1, 16, 800, 0, "Bell MT")
GUICtrlSetBkColor(-1, 0xFFFFFF)
Return
EndFunc   ;==>display

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit

;Case \$Form1

Case \$Input1
Case \$Input2
Case \$Root
\$c = Execute("\$a^\$b")
Display()
Case \$recip
\$c = Execute("1 / \$a")
Display()
Case \$Mult
\$c = Execute("\$a*\$b")
Display()
Case \$Div
\$c = Execute("\$a/\$b")
Display()
\$c = Execute("\$a+\$b")
Display()
Case \$Sub
\$c = Execute("\$a-\$b")
Display()
Case \$Per
\$c = Execute("(\$a*\$b)/100")
Display()
Case \$Sin
\$c = Execute("Sin(\$a)")
Display()
Case \$Clr
\$c = ""
Display()

\$pi = 4 * ATan(1) ;equals 3.14159265358979
Display()

Case \$c2a
\$a = \$c
\$Input1 = GUICtrlCreateInput(\$a, 40, 104, 145, 21)

Case \$c2b
\$b = \$c
\$Input2 = GUICtrlCreateInput(\$b, 40, 144, 145, 21)

Case \$Pi
\$a = 4 * ATan(1) ;equals 3.14159265358979
\$Input1 = GUICtrlCreateInput(\$a, 40, 104, 145, 21)

EndSwitch

WEnd```

Edited by DaveB
##### Share on other sites

Update New Modify. Mini Calculator Glass.

```#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <WinAPIEx.au3>

Opt("MustDeclareVars", 1)

HotKeySet("{ESC}", "send_close")
HotKeySet("1", "send_1")
HotKeySet("2", "send_2")
HotKeySet("3", "send_3")
HotKeySet("4", "send_4")
HotKeySet("5", "send_5")
HotKeySet("6", "send_6")
HotKeySet("7", "send_7")
HotKeySet("8", "send_8")
HotKeySet("9", "send_9")
HotKeySet("0", "send_0")
HotKeySet(".", "send_dot")
HotKeySet("=", "send_ans")
HotKeySet("{-}", "send_sub")
HotKeySet("{*}", "send_mul")
HotKeySet("{/}", "send_div")
HotKeySet("{BS}", "send_back")
HotKeySet("{DEL}", "send_clear")

Global \$Input, \$Btn1, \$Btn2, \$Btn3, \$Btn4, \$Btn5, \$Btn6, \$Btn7
Global \$Btn8, \$Btn9, \$Btn0, \$Btn_add, \$Btn_sub, \$Btn_mul
Global \$Btn_div, \$Btn_clear, \$Btn_dot, \$Btn_ans_com, \$Btn_ans_add
Global \$Btn_ans_sub, \$Btn_ans_mul, \$Btn_ans_div, \$nMsg, \$read
Global \$title = "Mini Calculator", \$cid = "Edit1", \$sread, \$thim
Global \$sFile = @SystemDir&'\Calc.exe', \$hForm, \$sFile, \$Btn_back
main()
Func main()
\$hForm = GUICreate("Mini Calculator", 305, 103, -1, -1, -1, \$WS_EX_LAYERED)
GUISetBkColor(0xABABAB)
GUISetIcon(\$sFile, -1, \$hForm)
\$Input = GUICtrlCreateInput("0", 8, 8, 290, 21, _
BitOR(\$WS_EX_CLIENTEDGE,\$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0xFFFFFF)
\$Btn1 = GUICtrlCreateButton("1", 8, 40, 27, 25, \$WS_GROUP)
\$Btn2 = GUICtrlCreateButton("2", 40, 40, 27, 25, \$WS_GROUP)
\$Btn3 = GUICtrlCreateButton("3", 72, 40, 27, 25, \$WS_GROUP)
\$Btn4 = GUICtrlCreateButton("4", 104, 40, 27, 25, \$WS_GROUP)
\$Btn5 = GUICtrlCreateButton("5", 136, 40, 27, 25, \$WS_GROUP)
\$Btn6 = GUICtrlCreateButton("6", 8, 72, 27, 25, \$WS_GROUP)
\$Btn7 = GUICtrlCreateButton("7", 40, 72, 27, 25, \$WS_GROUP)
\$Btn8 = GUICtrlCreateButton("8", 72, 72, 27, 25, \$WS_GROUP)
\$Btn9 = GUICtrlCreateButton("9", 104, 72, 27, 25, \$WS_GROUP)
\$Btn0 = GUICtrlCreateButton("0", 136, 72, 27, 25, \$WS_GROUP)
\$Btn_add = GUICtrlCreateButton("+", 176, 40, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
\$Btn_sub = GUICtrlCreateButton("-", 208, 40, 27, 25, \$BS_BOTTOM)
GUICtrlSetFont(-1, 15, 400, 0, "Arial")
\$Btn_mul = GUICtrlCreateButton("*", 176, 72, 27, 25, BitOR(\$BS_TOP,\$WS_GROUP))
GUICtrlSetFont(-1, 18, 400, 0, "Arial")
\$Btn_div = GUICtrlCreateButton("/", 208, 72, 27, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
\$Btn_clear = GUICtrlCreateButton("c", 240, 40, 27, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Arial")
\$Btn_back = GUICtrlCreateButton("BS", 270, 40, 27, 25)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
\$Btn_dot = GUICtrlCreateButton(".", 240, 72, 27, 25, \$BS_BOTTOM )
GUICtrlSetFont(-1, 18, 400, 0, "Arial")
\$Btn_ans_com = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
\$Btn_ans_add = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_sub = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_mul = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_div = GUICtrlCreateButton("=", 272, 72, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetState(-1, \$GUI_HIDE)
GUISetState(@SW_SHOW)
_WinAPI_SetLayeredWindowAttributes(\$hForm, 0xABABAB, 255, BitOR(\$LWA_COLORKEY, \$LWA_ALPHA))
While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
Case \$Btn1
Case \$Btn2
Case \$Btn3
Case \$Btn4
Case \$Btn5
Case \$Btn6
Case \$Btn7
Case \$Btn8
Case \$Btn9
Case \$Btn0
Case \$Btn_dot
Case \$Btn_back
GUICtrlSetData(\$Input, \$thim)
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_sub
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_mul
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_div
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_SHOW)
GUICtrlSetData(\$Input, '')
EndIf
Case \$Btn_ans_sub
Case \$Btn_ans_mul
Case \$Btn_ans_div
Case \$Btn_clear
GUICtrlSetState(\$Btn_ans_com, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
ContinueLoop
EndSwitch
WEnd
EndFunc

Func send_1()

EndFunc

Func send_2()
EndFunc

Func send_3()
EndFunc

Func send_4()
EndFunc

Func send_5()
EndFunc

Func send_6()
EndFunc

Func send_7()
EndFunc

Func send_8()
EndFunc

Func send_9()
EndFunc

Func send_0()
EndFunc

Func send_dot()
EndFunc

Func send_back()
GUICtrlSetData(\$Input, \$thim)
EndFunc

GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_sub()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_mul()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_div()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_div, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_clear()
GUICtrlSetState(\$Btn_ans_com, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_ans()
WinWaitActive(\$title, "", 1)
Send("{ENTER}")
EndFunc

Func enter()
WinWaitActive(\$title, "", 1)
Send("{ENTER}")
EndFunc

Func send_num_1()
EndFunc

Func send_num_2()
EndFunc

Func send_num_3()
EndFunc

Func send_num_4()
EndFunc

Func send_num_5()
EndFunc

Func send_num_6()
EndFunc

Func send_num_7()
EndFunc

Func send_num_8()
EndFunc

Func send_num_9()
EndFunc

Func send_num_0()
EndFunc

Func send_num_dot()
EndFunc

GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_num_sub()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_num_mul()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_num_div()
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mul, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_div, \$GUI_FOCUS)
GUICtrlSetData(\$Input, '')
EndIf
EndFunc

Func send_close()
Exit
EndFunc```

sak

see -

see - Calculator

##### Share on other sites

See my listing of all maths stuff in AutoIt I have found from various users: http://code.google.com/p/m-a-t/wiki/Maths

It's pretty complete, though I'm sure its missing some... 12 UDFs, 19 programs (12 of which are calculators).

Mat

##### Share on other sites

AZJIO

Thanks for the code and program.

Thanks Sam for combat worthiness.

I will be developed in writing better code.

##### Share on other sites

SAK: I get two errors when I try to run your script. Did I do something wrong?

: ERROR: can't open include file <WinAPIEx.au3>

C:\Documents and Settings\Program Files\AutoIt\Calculator.au3(6,10) : ERROR: can't open include file <WinAPIEx.au3>

#Include <WinAPIEx.au3>

~~~~~~~~~^

C:\Documents and Settings\Program Files\AutoIt\Calculator.au3(100,91) : ERROR: _WinAPI_SetLayeredWindowAttributes(): undefined function.

_WinAPI_SetLayeredWindowAttributes(\$hForm, 0xABABAB, 255, BitOR(\$LWA_COLORKEY, \$LWA_ALPHA))

##### Share on other sites

You can find the

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

##### Share on other sites

Great! Where do they need to be placed?

##### Share on other sites

Last modify update. Calculator desktop.

Forget includ file WinAPIEx.au3

```#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <WinAPIEx.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

HotKeySet("{ESC}", "guiclose")
Opt("MustDeclareVars", 1)

main()
Func main()
Local \$title = "MiniCalcDesktop", \$cid = "Edit1"
Local \$sFile = @SystemDir&'\Calc.exe'
Local \$hForm, \$Inp_disp, \$Btn_back, \$Btn_clear, \$Btn7, \$Btn8, \$Btn9
Local \$Btn4, \$Btn5, \$Btn6, \$Btn1, \$Btn2, \$Btn3, \$Btn0, \$Btn_dot
Local \$Btn_mult, \$Btn_div, \$Btn_sub, \$Btn_add, \$Btn_ans_div, \$Btn_ans_mult

\$hForm = GUICreate(\$title, @DesktopWidth, @DesktopHeight, -1, -1, _
BitOR(\$WS_POPUP,\$WS_CLIPSIBLINGS), BitOR(\$WS_EX_WINDOWEDGE,\$WS_EX_LAYERED))
GUISetBkColor(0xABABAB)
WinSetOnTop(\$title, "", 1)
GUISetIcon(\$sFile, -1, \$hForm)
\$Inp_disp = GUICtrlCreateInput("0", 8, 10, 120, 20, _
BitOR(\$WS_EX_CLIENTEDGE,\$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0xFFFFFF)
\$Btn7 = GUICtrlCreateButton("7", 8, 70, 27, 25, \$WS_GROUP)
\$Btn8 = GUICtrlCreateButton("8", 40, 70, 27, 25, \$WS_GROUP)
\$Btn9 = GUICtrlCreateButton("9", 72, 70, 27, 25, \$WS_GROUP)
\$Btn4 = GUICtrlCreateButton("4", 8, 100, 27, 25, \$WS_GROUP)
\$Btn5 = GUICtrlCreateButton("5", 40, 100, 27, 25, \$WS_GROUP)
\$Btn6 = GUICtrlCreateButton("6", 72,100, 27, 25, \$WS_GROUP)
\$Btn1 = GUICtrlCreateButton("1", 8, 130, 27, 25, \$WS_GROUP)
\$Btn2 = GUICtrlCreateButton("2", 40, 130, 27, 25, \$WS_GROUP)
\$Btn3 = GUICtrlCreateButton("3", 72, 130, 27, 25, \$WS_GROUP)
\$Btn0 = GUICtrlCreateButton("0", 8, 160, 27, 25, \$WS_GROUP)
\$Btn_dot = GUICtrlCreateButton(".", 40, 160, 27, 25, \$BS_BOTTOM )
GUICtrlSetFont(-1, 18, 400, 0, "Arial")
\$Btn_back = GUICtrlCreateButton("BS", 8, 40, 27, 25)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
\$Btn_clear = GUICtrlCreateButton("c", 103, 40, 27, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
\$Btn_div = GUICtrlCreateButton("/", 104, 70, 27, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
\$Btn_mult = GUICtrlCreateButton("*", 104, 100, 27, 25, BitOR(\$BS_TOP,\$WS_GROUP))
GUICtrlSetFont(-1, 18, 400, 0, "Arial")
\$Btn_sub = GUICtrlCreateButton("-", 104, 130, 27, 25, \$BS_BOTTOM)
GUICtrlSetFont(-1, 15, 400, 0, "Arial")
\$Btn_add = GUICtrlCreateButton("+", 104, 160, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
\$Btn_ans_com = GUICtrlCreateButton("=", 72, 160, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
\$Btn_ans_add = GUICtrlCreateButton("=", 72, 160, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_sub = GUICtrlCreateButton("=", 72, 160, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_mult = GUICtrlCreateButton("=", 72, 160, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetState(-1, \$GUI_HIDE)
\$Btn_ans_div = GUICtrlCreateButton("=", 72, 160, 27, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetState(-1, \$GUI_HIDE)
GUISetState(@SW_SHOW)
WinMove(\$title, "", 890, 5)
_WinAPI_SetLayeredWindowAttributes(\$hForm, 0xABABAB, 255, BitOR(\$LWA_COLORKEY, \$LWA_ALPHA))

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
ExitLoop
Sleep(3000)
ToolTip("")
Case \$Btn1
Case \$Btn2
Case \$Btn3
Case \$Btn4
Case \$Btn5
Case \$Btn6
Case \$Btn7
Case \$Btn8
Case \$Btn9
Case \$Btn0
Case \$Btn_dot
Case \$Btn_back
GUICtrlSetData(\$Inp_disp, \$trim)
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mult, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Inp_disp, '')
EndIf
Case \$Btn_sub
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mult, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_SHOW)
GUICtrlSetData(\$Inp_disp, '')
EndIf
Case \$Btn_mult
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mult, \$GUI_SHOW)
GUICtrlSetData(\$Inp_disp, '')
EndIf
Case \$Btn_div
GUICtrlSetState(\$Btn_ans_com, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mult, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_SHOW)
GUICtrlSetData(\$Inp_disp, '')
EndIf
Case \$Btn_ans_sub
Case \$Btn_ans_mult
Case \$Btn_ans_div
Case \$Btn_clear
GUICtrlSetState(\$Btn_ans_com, \$GUI_SHOW)
GUICtrlSetState(\$Btn_ans_sub, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_mult, \$GUI_HIDE)
GUICtrlSetState(\$Btn_ans_div, \$GUI_HIDE)
GUICtrlSetData(\$Inp_disp, '')
ContinueLoop
EndSwitch
WEnd
EndFunc

Func guiclose()
Exit
EndFunc```
Edited by sak

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
×
• Create New...