Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lynkynpark86

macrumors 6502
Original poster
Anyone who has used and written extensions for alfred, can you tell me if this is possible:
I want to write an applescript to take the input, do it's process, and spit it out in the first result box. To understand what I mean, type "2+2" into alfred. I want to put the output where alfred puts "4", and also have the "copy to clipboard" function of Calculator. Can this be done?
 

seepel

macrumors 6502
Dec 22, 2009
471
1
a friend of mine wrote a great utility for this type of thing. it's called CalcuBar and it available in the app store. it handles basic to not soba sic functions and can even save macros. I use it regularly and for $0.99 I think it is definitely worth the price of admission.
 

lynkynpark86

macrumors 6502
Original poster
a friend of mine wrote a great utility for this type of thing. it's called CalcuBar and it available in the app store. it handles basic to not soba sic functions and can even save macros. I use it regularly and for $0.99 I think it is definitely worth the price of admission.

I appreciate the time you took to answer, but... Did you read the question?
 

seepel

macrumors 6502
Dec 22, 2009
471
1
Yes I did read the question, I assumed you were looking for a solution to the problem of "I want to quickly calculate things". So that is what I answered.

If you really want to do it yourself I'm afraid I can't give any insights on writing a plugin for Alfred as I'm unfamiliar. But as for as the math end, You'll probably want to look into tokenizing and likely NSScanner. Once you've tokenized the sting you can map operators (like "+") to the operations they represent.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.