Calculator

Post your working scripts, libraries and tools for AHK v1.1 and older
Ben the Coder

Calculator

Post by Ben the Coder » 28 Jun 2022, 09:50

Hi, this is a calculator that I made!
Here's the link to it:
https://1drv.ms/u/s!AssKrEUmq8NOsVOw6V1gtLtwqc9f
Attachments
SimpleCalc.ahk
(1.69 KiB) Downloaded 226 times

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Calculator

Post by BoBo » 28 Jun 2022, 10:43

@Ben G - Thx for sharing it! :thumbup: .
BTW, you can also upload your scripts to this forum as an attachment to your posting (done on your behalf so you can see it. Feel free to delete it if not fine with you). HTH 8-)

Ben the Coder

Re: Calculator

Post by Ben the Coder » 28 Jun 2022, 12:39

Yes, I've done it before, but for some reason it wasn't working for me.

Ben the Coder

Re: Calculator

Post by Ben the Coder » 28 Jun 2022, 15:29

I can't seem to delete this post!
Well, we can leave it.
Last edited by Ben the Coder on 03 Jul 2022, 09:48, edited 1 time in total.

User avatar
boiler
Posts: 16773
Joined: 21 Dec 2014, 02:44

Re: Calculator

Post by boiler » 02 Jul 2022, 21:25

@Ben G - Executables shared on this forum must be accompanied by their source code. Please post the source code for new version as well if you would like to keep the link to the executable in your post. You can post the source .ahk file in a code box, as an attachment, or in your OneDrive link (or a link to some other repository).

Ben the Coder

Re: Calculator

Post by Ben the Coder » 03 Jul 2022, 09:42

Oh, I see. I'll do that in a sec.

Ben the Coder

Re: Calculator

Post by Ben the Coder » 03 Jul 2022, 09:46

Nope, I can't do it. I'll delete the exe file now.

User avatar
boiler
Posts: 16773
Joined: 21 Dec 2014, 02:44

Re: Calculator

Post by boiler » 03 Jul 2022, 11:27

You can’t post the source AHK code or you don’t want to? It’s very easy to post the code in a code box here in a post. I can show you how if you would like.

Ben the Coder

Re: Calculator

Post by Ben the Coder » 03 Jul 2022, 13:24

I know how to, but I don't have it anymore (I only have the new, slightly buggy, and non-finished version). So I only have the exe file from that previous version.
Sorry!

garry
Posts: 3740
Joined: 22 Dec 2013, 12:50

Re: Calculator

Post by garry » 03 Jul 2022, 14:00

we have your ahk script , works fine , only 2ndTAB ( convert ) seems not finished , I think
if you have your new Easycalc.exe maybe it's possible to convert back to > Easycalc.ahk

Code: Select all

#Warn
#SingleInstance Force
Gui, Add, Tab2,, Math|Convert
Gui, Font, s12, Arial Nova
;--------------------------
Gui, Add, Text,, Input first number:
Gui, Add, Text,, Choose operator:
Gui, Add, Text,, Input second number:
;-
Gui, Add, Edit, vC1 ym ,20    ;-for test can overwrite
Gui, Add, DropDownList, vOperator, +|-|*|/|^
Gui, Add, Edit, vC2 ,11   ; for test 
;-
Gui, Add, Button, default gA1,CALCULATE
;-
;- next TAB ( not used at moment ) ---
Gui, Tab, 2
Gui, Add, DropDownList, vTypeunit, Temperature|Distance|Mass/Weight|Speed
Gui, Add, ListBox, vTest, Celsius|Fahrenheit|Kelvin
;-
Gui, Show,, SimpleCalc
GuiControl,1: ChooseString,operator,+   ;- for test 
return
;-------------
GuiClose:
Exitapp
;-------------
A1:
Gui, Submit,nohide
result:=""
Switch, Operator
{
Case "+":Result := C1 + C2
Case "*":Result := C1 * C2
Case "-":Result := C1 - C2
Case "/":Result := C1 / C2
Case "^":Result := C1 ** C2
}
MsgBox,% "The answer is: " Result
return
;==========================================

Ben the Coder

Re: Calculator

Post by Ben the Coder » 05 Jul 2022, 09:34

Ok, thanks! I'll try it. :D

marcelosl240485
Posts: 1
Joined: 31 Jul 2022, 20:11

Re: Calculator

Post by marcelosl240485 » 31 Jul 2022, 20:13

I don't have enough knowledge to create this script, but if anyone is interested in the idea, I'll share it here.

The idea is that if the script is enabled, when typing a number on the numpad, windows responds with voice indicating the typed number.

The purpose is to prevent misclick because the voice is one more item for you have focus on the key you typed.

- For example, you want to type "428", but you made a mistake and without realizing it you type "458".

Then the sound could make you realize the wrong and you can fix it, preventing a miscalculation.

perhaps useless and inconvenient?

Ben the Coder

Re: Calculator

Post by Ben the Coder » 01 Aug 2022, 09:21

I could do that, but it would be really hard (I think).
Good idea though! :D

Post Reply

Return to “Scripts and Functions (v1)”