in-line calculator

Post your working scripts, libraries and tools
User avatar
davebrny
Posts: 29
Joined: 05 Dec 2016, 06:26
GitHub: davebrny

in-line calculator

27 Jan 2017, 13:26

an interfaceless calculator that can be used almost anywhere in windows where you can enter text

- activate the calculator by pressing the = key, type an equation and then press the = key to delete the equation and paste the result, or end with the # key to leave the equation text where it is and paste the result after it
- you can also select equation text and use the hotkeys alt + = or alt + # to calculate it
- if youre using a keyboard that doesnt have a number pad then you can use the letter keys p m x d instead of + - * / which makes this easier to type since you dont have to use the shift key

see the github page for more details


latest release: v2.4.2 (10th october 2017)
https://github.com/davebrny/in-line-calculator/releases

Image
Last edited by davebrny on 10 Oct 2017, 03:33, edited 3 times in total.
Helgef
Posts: 2246
Joined: 17 Jul 2016, 01:02
Contact:

Re: in-line calculator

27 Jan 2017, 13:39

Good idea :thumbup:
I will test this.
guest3456
Posts: 2024
Joined: 09 Oct 2013, 10:31

Re: in-line calculator

27 Jan 2017, 14:19

vnice

SpecialGuest
Posts: 6
Joined: 15 May 2016, 07:49

Re: in-line calculator

27 Jan 2017, 14:56

nice one - very handy :)
This can greatly improve productivity !
User avatar
davebrny
Posts: 29
Joined: 05 Dec 2016, 06:26
GitHub: davebrny

Re: in-line calculator

28 Jan 2017, 12:00

Helgef wrote:Good idea :thumbup:
I will test this.


ive think ironed out all the bugs at this stage (on my system anyway) but if you find some more then be sure to give me a roasting here or on github

SpecialGuest wrote:nice one - very handy :)
This can greatly improve productivity !


yes, the less going back and forth between the windows calculator and some other program the better :D

guest3456 wrote:vnice


thanks!



seems like the same sort of idea yea. i made this nearly a year and a half ago now so that was the last time i checked to see if there was anything similar around. i didnt come across that script by Laszlo though so i must look around for that. do a bit of light pillaging on it maybe...
vasili111
Posts: 729
Joined: 21 Jan 2014, 02:04
Location: Georgia

Re: in-line calculator

28 Jan 2017, 23:19

Interesting idea :)
DRAKON-AutoHotkey: Visual programming for AutoHotkey.
User avatar
davebrny
Posts: 29
Joined: 05 Dec 2016, 06:26
GitHub: davebrny

Re: in-line calculator

26 May 2017, 11:56

ive changed how this works slightly.
https://github.com/davebrny/in-line-calculator/releases

instead of the calculator becoming active when you first press one of the number keys, you now have to press the grave/backtick key and then type an equation.
there were a few situations where you could be typing something like a date (12-01-2017) and then one of the end keys (= or #) after it which would mean the date would be calculated by accident... so this should cut down the chances of things like that happening
brutus_skywalker
Posts: 88
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: in-line calculator

15 Jun 2017, 10:05

HERE's A FAR SIMPLER ALTERNATIVE: in just 70lines,

valid inputs are: "x=4+12 OUTPUT: 'x=16' " OR "4+12 OUTPUT: '16' "
Just select the expression you want to calculate & press Ctrl+Shift+C,the answer as in the examples will replace selected expression. CHEERS. :dance:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

It's the little things,that make the world go round and round,or maybe not,i dunno...
User avatar
Pinkfloydd
Posts: 103
Joined: 13 Apr 2014, 18:32
Location: Argentina

Re: in-line calculator

21 Jun 2017, 00:23

I have a Spanish keyboard and I don't have direct keys to input = or # symbols
for example:
If I want to type and "equal", it is "Shift + 0".
And "Hashs" are with "Shift + 3".

So I think it isn't recognizing my operations when you don't have those direct keys.
Helgef
Posts: 2246
Joined: 17 Jul 2016, 01:02
Contact:

Re: in-line calculator

21 Jun 2017, 04:05

@davebrny
I remember I had some problems with this script too, it might be for the same reasons Pinkfloydd describes. I ended up doing something similar to brutus_skywalker, I use it all the time, so thank you very much for the idea.
zhotkey
Posts: 2
Joined: 21 Jun 2017, 08:22

Re: in-line calculator

21 Jun 2017, 08:36

This script nor Brutus script works with either Unix Exceed or Windows version of Emacs. Brutus script doesn't replace the highlighted text but it sometimes copies the answer to the clipboard but not for the windows version of Emacs. Davebrny's script doesn't work at all for Exceed or Emacs.
robertcollier4
Posts: 33
Joined: 09 Apr 2016, 22:14

Re: in-line calculator

21 Jun 2017, 13:06

Nice, thanks... Check out also this one by derRaphael, which may contain some useful code:
https://autohotkey.com/board/topic/5908 ... -brackets/
User avatar
boiler
Posts: 1850
Joined: 21 Dec 2014, 02:44

Re: in-line calculator

22 Jun 2017, 04:09

Just so people new to this thread don't get the wrong impression about davebrny's script: I've been using his original script (without the back tick key to initiate) with a US keyboard, and I really like it. It's usage is simple, which is what matters to the user rather than the number of lines in the code (it's nowhere close to being a resource hog). It also has more features and is more flexible than the simpler code.
User avatar
davebrny
Posts: 29
Joined: 05 Dec 2016, 06:26
GitHub: davebrny

Re: in-line calculator

10 Oct 2017, 03:22

i have made a few changes to this script:

- the equals key is now the default trigger that starts the calculator instead of the grave/backtick key
- the default key can now be changed to another key such as #, [ or the backtick
- if "trigger_key" is left blank then the calculator will start when any of the number keys are pressed (like in the original version)
- the number pad enter key can be used to send both the trigger key and endkey
- - this works best when the trigger key is left blank as the enter key will still send 'enter' when the calculator is off

https://github.com/davebrny/in-line-calculator/releases v2.4.2


boiler wrote:I've been using his original script (without the back tick key to initiate)


ive gone back to triggering it with the number keys. even after a few months of trying to use the backtick, i still couldnt get rid of the muscle memory that i had built up with the original script :headwall:

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 12 guests