Page 1 of 1

Calculator

Posted: Thu Jul 12, 2007 5:59 pm
by Richard Naninck
Just wrote a simple calculator script + panel.
It works.
The hbx file contains the panel, script, script device and null device.

Have fun.

Updated 5 August 2007

Posted: Thu Jul 12, 2007 7:25 pm
by ScottBot
Geez. HouseBot can do anything :wink:

Nice one Richard. Thanks.

Posted: Fri Jul 13, 2007 4:02 pm
by Richard Naninck
Just updated the first post with the latest version. This one has memory functions (M+, MR, MC) just like the standard windows calculator. Changed the image as well as the hbx file. Not sure what the windows MS button stands for, so I left it out.
If this product (plugin) is of interest to anybody and they want to have more functions like 1/x, %, sqrt etc please let me know and maybe I will add those too. It's just that I usually don't use these functions so I left them out.

Posted: Sat Jul 14, 2007 9:55 am
by dlmorgan999
MS is "Memory Store". This saves the current value to memory overwriting any value currently stored in the memory. M+ is "Memory Plus" (think of it as "Memory Add"). It takes the current value and *adds* it to the current contents of the memory. Nice job by the way!

-- Dave

Posted: Sat Jul 14, 2007 11:28 am
by Richard Naninck
Aha, that figures and it makes so much sense that I will have to add it.
I always use M+, but I always start from 0. While Starting from 0, M+ and MS do the same thing.

Yesterday I found three small bugs.
- Couldn't enter 0.x and now that is fixed, but not uploaded yet. Will do so with the next version containing MS.
- Couldn't do Value + Memory whereas Memory + Value was possible. The next version both are possible.
- After storing a value in Memory and then entering a (new) digit, the digit was added in the display whereas it should start from zero again. Also fixed.

Also added Clear^Exit for the Panels Exit List. This clears the buffer and the Memory after Panel Exit so the next start will always be clean.

Posted: Sat Jul 14, 2007 11:40 am
by Richard Naninck
First post is updated again.
Three bugfixes (see previous post) and MS functionality added and M+ functionality corrected.

Posted: Thu Aug 02, 2007 11:08 pm
by incoronado
Great Ultility.

Posted: Fri Aug 03, 2007 3:08 pm
by Richard Naninck
Thanks. It's actually looking at bit different already again. If you ever get to it, please post your metal (good and better than mine) looking graphics here.

Posted: Sun Aug 05, 2007 10:08 am
by Daan
Have you tried entering .25 times 3? You get 750 as a result. Same for 0.25 devided by three, you get some strange results.

Anyway, cool plugin! Thanks!

Posted: Sun Aug 05, 2007 10:15 am
by Richard Naninck
Well, not in mine so I must have fixed that already and didn't upload it.
I will update post 1 to get it fixed.

Posted: Fri Aug 31, 2007 1:18 am
by incoronado
I have packaged Richard's awesome Calculator with an additional theme.

Posted: Fri Aug 31, 2007 5:03 am
by Richard Naninck
Wow, I wish I could create stuff like that. Awesome and thanks! I will use this one in stead of my own.

Posted: Sat Sep 22, 2007 7:41 pm
by Steve Horn
A suggestion for your calculator script: On many calculators, entry of a number, the times (X) sign, then =, squares the number. That is: 5X= yields 25. On yours, it yields 0, since there is no 2nd number. Also, a percent function would be nice. Just a thought I had using it the other day...
FWIW,

Posted: Sun Sep 23, 2007 12:20 pm
by Richard Naninck
I tried a simple hack to get the X = square in, but it wasn't so easy because the function messed with other calculations. I will look into this next week orso. As for the %, I never understood it's functionality so unless I get that straight, it probably won't make it in. Luckily this is all opensource so everybody is free to make their own adjustsments.
1/x and sqrt actually do make sense.

Posted: Sun Sep 23, 2007 4:26 pm
by Richard Naninck
Updated first post and added calculator.zip. Just copy it over the old script and all should work without any other changes.

It contains an updated script where 5 x = 25 and 6 + = 12 etc.

Still not sure about the %

1/x and sqr will be added later since it requires a panel update as well.