Login Register






[AutoIt] Simple Calculator filter_list
Author
Message
[AutoIt] Simple Calculator #1
Code:
#include <EditConstants.au3> #NoTrayIcon Main() Func Main() GUIDelete() $Main = GUICreate("Calculator by ReaperX", 300, 330) $Input = GUICtrlCreateInput("", 10, 50, 280, 20, BitOr($ES_RIGHT, $GUI_SS_DEFAULT_INPUT, $ES_READONLY)) $C_Button = GUICtrlCreateButton("C", 185, 72, 50, 30) $Evaluate = GUICtrlCreateButton("=", 235, 72, 50, 30) $0_Button = GUICtrlCreateButton("0", 95, 270, 50, 30) $1_Button = GUICtrlCreateButton("1", 35, 150, 50, 30) $2_Button = GUICtrlCreateButton("2", 95, 150, 50, 30) $3_Button = GUICtrlCreateButton("3", 155, 150, 50, 30) $4_Button = GUICtrlCreateButton("4", 35, 190, 50, 30) $5_Button = GUICtrlCreateButton("5", 95, 190, 50, 30) $6_Button = GUICtrlCreateButton("6", 155, 190, 50, 30) $7_Button = GUICtrlCreateButton("7", 35, 230, 50, 30) $8_Button = GUICtrlCreateButton("8", 95, 230, 50, 30) $9_Button = GUICtrlCreateButton("9", 155, 230, 50, 30) $Plus_Button = GUICtrlCreateButton("+", 215, 150, 50, 30) $Minus_Button = GUICtrlCreateButton("-", 215, 190, 50, 30) $Times_Button = GUICtrlCreateButton("x", 215, 230, 50, 30) $Divide_Button = GUICtrlCreateButton("/", 215, 270, 50, 30) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case -3 Exit Case $0_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "0") Case $1_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "1") Case $2_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "2") Case $3_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "3") Case $4_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "4") Case $5_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "5") Case $6_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "6") Case $7_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "7") Case $8_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "8") Case $9_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "9") Case $C_Button GUICtrlSetData($Input, "") Case $Plus_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "+") Case $Minus_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "-") Case $Divide_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "/") Case $Times_Button GUICtrlSetData($Input, GUICtrlRead($Input) & "*") Case $Evaluate $Ans = Execute(GUICtrlRead($Input)) If @Error Then MsgBox(16, "Error!", "Error Solving Equation!") Main() EndIf If StringRight(GUICtrlRead($Input), 2) = "/0" Then MsgBox(16, "Error!", "Divide By Zero Error!") GUIDelete() Main() EndIf GUICtrlSetData($Input, GUICtrlRead($Input) & " = " &$Ans) EndSwitch WEnd EndFunc
(This post was last modified: 12-03-2011, 03:43 PM by Skullmeat.)

Reply

RE: [AutoIt] Simple Calculator #2
Nice job its really cool!!!
btw i edited the blank buttons i don't think their required Tongue
Pierce the life fibers with your drill.

Reply

RE: [AutoIt] Simple Calculator #3
(12-03-2011, 03:44 PM)[ntdll.dll]x[advapi32.dll] Wrote: Nice job its really cool!!!
btw i edited the blank buttons i don't think their required Tongue

I Know. I just added the Blank Buttons Because it Looked Kind of Funny Without Anything Right There. xD

Reply

RE: [AutoIt] Simple Calculator #4
WHY ARE YOU ALWAYS STEALING MY IDEAS DDDDD;

I am literally remaking MS calculator in autoit3 right now, but have no time xD

Reply

RE: [AutoIt] Simple Calculator #5
i really dont understand what this is. could you explain me

Reply

RE: [AutoIt] Simple Calculator #6
(12-03-2011, 06:49 PM)dcgp Wrote: i really dont understand what this is. could you explain me

This is a custom made calculator in a desktop computer scripting language which is called AutoIt3
Pierce the life fibers with your drill.

Reply

RE: [AutoIt] Simple Calculator #7
Thanks!! I really love this language! :lol:
If you're cool click this: http://adf.ly/MWQtY

My newly created blog: http://www.learn-basic-hacking.blogspot.dk/

Reply