Jump to content

Calculator improvements


Recommended Posts

The way I use the calculator most often in Alfred is, I enter a partial calculation, hit enter, then toggle Alfred again, hit paste, and continue my calculation.  I was thinking this could be set up so that a right arrow (or a tab, or whatever shortcut) could change Alfred's currently entered text to the result of the current entry.

 

In other words, I enter "120-20" and press right arrow.  The text box then shows "100", and if I just type "/5" the text box will contain "100/5" and the subtext will show "20".  Whereas currently, if I enter "120-20/5", the subtext will (correctly) show 116.

 

Alternatively, and perhaps more usefully, a right arrow double tap at the end of the line could just enclose the currently entered expression in parentheses.  Then the sequence would be, "120-20" (right arrow) "/5", whereupon the display would show "(120-20)/5" with the subtext "20".

 

And while we're at it, if we could get the parser to recognize that parentheses directly next to a number means multiplication, that would be awesome.  That is: 53(20) = 1060.  Currently it only recognizes multiplication if an asterisk * is typed.  (Spotlight can parse this correctly...we can't have Spotlight outdoing Alfred!)  o_O

Link to comment
Share on other sites

The way I use the calculator most often in Alfred is, I enter a partial calculation, hit enter, then toggle Alfred again, hit paste, and continue my calculation.  I was thinking this could be set up so that a right arrow (or a tab, or whatever shortcut) could change Alfred's currently entered text to the result of the current entry.

 

In other words, I enter "120-20" and press right arrow.  The text box then shows "100", and if I just type "/5" the text box will contain "100/5" and the subtext will show "20".  Whereas currently, if I enter "120-20/5", the subtext will (correctly) show 116.

 

Alternatively, and perhaps more usefully, a right arrow double tap at the end of the line could just enclose the currently entered expression in parentheses.  Then the sequence would be, "120-20" (right arrow) "/5", whereupon the display would show "(120-20)/5" with the subtext "20".

 

And while we're at it, if we could get the parser to recognize that parentheses directly next to a number means multiplication, that would be awesome.  That is: 53(20) = 1060.  Currently it only recognizes multiplication if an asterisk * is typed.  (Spotlight can parse this correctly...we can't have Spotlight outdoing Alfred!)  o_O

 

To put the current answer into Alfred's search, try typing an '=' at the end of your calculation (e.g. '42/7=' or '=sin(60)=' for the advanced calculator)

 

I do like the parentheses idea, though. I hate moving my cursor just to wrap in parentheses.

 

+1 for a smarter parser :)

 

Cheers :)

Edited by Tyler Eich
Link to comment
Share on other sites

To put the current answer into Alfred's search, try typing an '=' at the end of your calculation (e.g. '42/7=' or '=sin(60)=' for the advanced calculator)

 

I do like the parenthesis idea, though. I hate moving my cursor just to wrap in parenthesis.

 

+1 for a smarter parser :)

 

Cheers :)

 

Aha!  Thanks for the tip on the equals sign.  That's exactly what I had wanted, before I started writing about it and thought of the parentheses idea.

 

Thanks for the +1 :)

Link to comment
Share on other sites

  • 2 months later...

I wish I could offer more than to second the request for a way to easily wrap with parentheses. I like to use Alfred to quickly and easily perform calculations that I'm often 'making up' as I go, or, I change one part of the calculation, but don't want to lose the first part. Yes, it defeats the ease of Alfred to have to keep pressing the arrow keys to add parentheses. Heaven forbid using the mouse/trackpad!

 

Thanks!

tv

Link to comment
Share on other sites

Actually, I just tried to use the calculation function in a different way, that I wish worked: I performed a calculation, entered the result in the clipboard, then performed another calculation, entered THAT result in the clipboard. Now, I would like to use the snippet capture feature to enter those two results as another calculation. 

 

So, I want to be able to add a snippet to the main Alfred window, then access the snippet window again, enter...

 

You get the picture. I guess that's asking for a whole rewrite...sorry.

Link to comment
Share on other sites

OMG! I just found something Alfred does that pretty much fixes my calculation wishes: use Control-e and Control-a to jump to the end or beginning of entered text. Basically, the entry window uses Emacs bindings. 

 

Eureka! This opens a whole new world. Thank you, Alfred, for continuing to amaze with your usefulness...

Link to comment
Share on other sites

Supporting decimals in the basic calculator mode would be nice. It just dumps into search.

 

Could you be more specific? When I type '.4 + 10.3' in the basic calculator, I get an answer, not fallback results. What kind of things are you typing into Alfred?

 

Cheers :)

Link to comment
Share on other sites

Actually, I think what I see is a bug. On my system, if I set the separator to a comma instead of system defaults (I live in Thailand and do not what the locality defaults), then any decimals in a number pushes Alfred to default search mode. It seems to be a bug similar to what I reported about the thousands separator.

Link to comment
Share on other sites

Actually, I think what I see is a bug. On my system, if I set the separator to a comma instead of system defaults (I live in Thailand and do not what the locality defaults), then any decimals in a number pushes Alfred to default search mode. It seems to be a bug similar to what I reported about the thousands separator.

 

Go to Features > Calculator > Input, and set your Input to "use decimal point as separator" if you want Alfred to only accept 10.3 as ten point three, or comma as separator if you want 10,3 to be the input format for the same thing. If you want Alfred to accept both formats, set it to "Use decimal point and comma as separator".

Link to comment
Share on other sites

  • 2 weeks later...

Was not sure if to create a new thread or just append to this one so did the latter. It would be great if the ability to calculate time duration could be implemented, for example I would type the following = 8:30 AM - 6:15PM and the value of 10:15 would be displayed. The implementation of the Excel calculations on the following link would be great or at least the basic one (=TEXT(B2-A2,"h:mm")

 

http://office.microsoft.com/en-us/excel-help/calculate-the-difference-between-two-times-HP003056108.aspx

 

I believe it would be of great value to anyone in the work force, I noticed quite a few people have a separate excel (or numbers) document open just do this this calculation. 

Edited by geovanimartinez
Link to comment
Share on other sites

  • 8 months later...

Was not sure if to create a new thread or just append to this one so did the latter. It would be great if the ability to calculate time duration could be implemented, for example I would type the following = 8:30 AM - 6:15PM and the value of 10:15 would be displayed. The implementation of the Excel calculations on the following link would be great or at least the basic one (=TEXT(B2-A2,"h:mm")

 

http://office.microsoft.com/en-us/excel-help/calculate-the-difference-between-two-times-HP003056108.aspx

 

I believe it would be of great value to anyone in the work force, I noticed quite a few people have a separate excel (or numbers) document open just do this this calculation. 

 

I second this one, I find myself regularly trying to get Alfred to calculate time differences, e.g. 10:15-1:50. It should be possible to add this as a workflow, but native support would be awesome.

 

David

Link to comment
Share on other sites

I second this one, I find myself regularly trying to get Alfred to calculate time differences, e.g. 10:15-1:50. It should be possible to add this as a workflow, but native support would be awesome.

 

David

 

I'd suggesting posting this idea in the "Workflow help & questions" section as this is more of a workflow idea than something the calculator would do, as the calculator works with raw numbers. I've had a quick look and don't see an existing workflow for this, but I'm sure someone will be able to help you create one :)

Link to comment
Share on other sites

I second this one, I find myself regularly trying to get Alfred to calculate time differences, e.g. 10:15-1:50. It should be possible to add this as a workflow, but native support would be awesome.

David

I made a workflow to do this :)

Check it out: http://www.alfredforum.com/topic/4568-duration-calculator-%E2%80%94-add-and-subtract-durations-of-time/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...