|
|
The hidden calculator in OS X
|
|
|
|
Forum Regular
Join Date: Dec 2005
Location: Orlando, FL
Status:
Offline
|
|
Its been a few years since I switched to macs and every now and then I would learn about some cool feature of OS X that would just blow me away. Today I found out about the hidden calculator (AppleScript). Very often I'll be typing an email or surfing the web and I'll want to do some simple math like say "3.1415 * 3.5 ^ 2" but to do this I'll have to open the Calculator application make a few clicks to input the numbers and its a big pain. I would rather use a real calculator, but I just found out in Tiger all you need to do is type in some expression "3.1415 * 3.5 ^ 2" or even "pi * 3.5 ^ 2" select it and press command + shift + 8 and you have the result replacing your selection. That is just amazing. This works in Mail, Safari, TextEdit and almost all the applications that I have tried. It seems to work even in 10.3. I'm sure most of you guys must be aware of it but there would be others (like me) who would find this helpful. I thought I'll share.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Dec 2000
Location: Staffs, UK
Status:
Offline
|
|
Haha - that is cool. Thanks for sharing.
2 + 2 = 4
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2001
Location: Madison, WI
Status:
Offline
|
|
Doesn't work for me in Mail...beachballs and I have to force quit
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Dec 2005
Location: Orlando, FL
Status:
Offline
|
|
Check your Mail Preferences (Composing), if your mail format is "Rich Text" it might not work, should work with "Plain Text" though. But I don't see why you should get the beach ball.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Nov 2001
Location: Dark Side of the Moon
Status:
Offline
|
|
That is very cool, a pity the apple script has to launch too, but still cool. I wonder if they could integrate it nicely in Leopard, ala the dictionary window that pops up.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Oct 2002
Location: England | San Francisco
Status:
Offline
|
|
|
we don't have time to stop for gas
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2001
Location: Madison, WI
Status:
Offline
|
|
Originally Posted by hemant
Check your Mail Preferences (Composing), if your mail format is "Rich Text" it might not work, should work with "Plain Text" though. But I don't see why you should get the beach ball.
No. I'm using plain text. It works in TextEdit, TextWrangler, Camino, and others. Could be due to the other Applescripts I have in Mail.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Hey, that's great! Thanks a lot for that tip. I think I'll be making a lot of use of this. It works in every app that supports Services, which includes all Cocoa apps.
Unfortunately, Word is not one of those apps. I hope those rumors of iWork getting a spreadsheet and a proper font menu are true - I may consider switching if that happens.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jun 2006
Location: "Working"
Status:
Offline
|
|
That's pretty cool...I actually converted the expressions you guys wrote directly in Safari...so 2 + 2 = 4 became 4 = 4 in my browser window.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Aug 2004
Location: Seattle, WA
Status:
Offline
|
|
Doesn't work for me either. I think this is because they way it's being run (through the script service) and because Apple + * (or apple shift 8) is listed as "Get result of Applescript", and script editor may think you mean different scripts. When I do it, it pastes whatever is on the clipboard into the text box.
Someone correct me if I'm wrong, but I'm guessing the calculator trick works if you've never used script editor before.
|
Impulse Response
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Doesn't work for me. Odd.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
Get CalcService (free) which lets you do even more. From the same developer as WordServices.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Oct 2002
Status:
Offline
|
|
yeah wow, this totally screws up my mail.. none of the commands really work anymore.
how totally annoying.
so fyi, before you try this get ready to totally fuxor your machine.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
What do you mean by "none of the commands"?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
2 + 2
Nope. Doesn't work for me at all. Weird.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2001
Location: Australia
Status:
Offline
|
|
works for me, launches script editor in the background.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Aug 2002
Location: Safe House
Status:
Offline
|
|
Only works in TextEdit for me
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jul 2001
Location: Behind the dryer, looking for a matching sock
Status:
Offline
|
|
Originally Posted by - - e r i k - -
4
Nope. Doesn't work for me at all. Weird.
Works in mine, apparently.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Oct 2003
Location: Saint Louis, MO
Status:
Offline
|
|
Works for me in Safari's Google search.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
Originally Posted by xi_hyperon
Works in mine, apparently.
Thanks, I'll be sure to call on you for all my math problems from now on
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jul 2006
Status:
Offline
|
|
Doesn't work for me...
A while back, about 8 months ago, it would not work. A few weird things happened other than this, and I decided to reinstall the OS from scratch. This was one of the first things that I tested, and it finally worked. Now, it no longer works again.
It's quite annoying. I'd love to know why it works, but then simply stops working for no obvious reason. Deleting preference files for Script Editor does nothing.
Anyone have any idea why it would stop working?
|
Dennis R. Metzcher
MyMacBlog.com: My experiences with the Mac OS, a switcher's point of view. With a new Mac tip each week day.
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jul 2006
Status:
Offline
|
|
Whatever the problem is, it's with my account, because this works in another account that I have set up on my machine. Weird.
|
Dennis R. Metzcher
MyMacBlog.com: My experiences with the Mac OS, a switcher's point of view. With a new Mac tip each week day.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2001
Location: Helsinki, Finland
Status:
Offline
|
|
Works, if I use the correct shortcut for my keyboard, which is cmd-shift-' , or cmd-* (same thing).
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
Originally Posted by dmetzcher
Whatever the problem is, it's with my account, because this works in another account that I have set up on my machine. Weird.
You probably installed something with a conflicting keyboard shortcut.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jul 2006
Status:
Offline
|
|
Originally Posted by JKT
You probably installed something with a conflicting keyboard shortcut.
It's not the shortcut. It see the TextEdit menu light up briefly when I press the keys, so I know there is no conflict. Also, I tested it by clicking the menu item itself. The problem we (many of us) are having is not a shortcut issue, it's a problem with this service not working at all, regardless of which of the three menu items under Services -> Script Editor is used.
I've been looking for an answer to this problem for months now, and have never seen one posted anywhere on the Web. All the questions, on every board I've looked at, including Apple's, have gone unanswered. This feature is clearly problematic, at best, and seems to stop working for many people after several months, for whatever reason. It's just not reliable enough to be useful, frankly.
|
Dennis R. Metzcher
MyMacBlog.com: My experiences with the Mac OS, a switcher's point of view. With a new Mac tip each week day.
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jul 2001
Location: Sydney, Australia
Status:
Offline
|
|
Doesn't work for me either FWIW, the textedit menu flashes and that's it.
|
You can't eat all those hamburgers, you hear me you ridiculous man?
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Aug 2001
Location: Capitol City
Status:
Offline
|
|
works great for me in my chat text area and google box, and maybe even this...lets try a good one 10^(10/5) => 100.0 seems to work. Thats pretty spiff
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
Originally Posted by dmetzcher
It's not the shortcut. It see the TextEdit menu light up briefly when I press the keys, so I know there is no conflict. Also, I tested it by clicking the menu item itself. The problem we (many of us) are having is not a shortcut issue, it's a problem with this service not working at all, regardless of which of the three menu items under Services -> Script Editor is used.
I've been looking for an answer to this problem for months now, and have never seen one posted anywhere on the Web. All the questions, on every board I've looked at, including Apple's, have gone unanswered. This feature is clearly problematic, at best, and seems to stop working for many people after several months, for whatever reason. It's just not reliable enough to be useful, frankly.
Install CalcService instead and see if it works (link is toward the bottom of that page).
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Dec 2002
Location: Partying down with the Ewoks, after I nuked the Death Star!
Status:
Offline
|
|
I just use the damn dashboard one.
|
"Hello, what have we here?
|
|
|
|
|
|
|
|
Baninated
Join Date: Sep 2002
Location: http://www.rotharmy.com
Status:
Offline
|
|
me too
the calculator app is buggy as ....
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Oct 2003
Location: Saint Louis, MO
Status:
Offline
|
|
Hmmm...it doesn't appear to work in Mail
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Dec 2000
Status:
Offline
|
|
at first i thought it didn't work, all it did was paste what was on the clipboard...but you actually have to follow the directions. i wasn't highlighting the problem/expression.
BTW, it works with the stickies too. it just sucks that it launches applescript.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jul 2006
Status:
Offline
|
|
Originally Posted by nuckin futs
at first i thought it didn't work, all it did was paste what was on the clipboard...but you actually have to follow the directions. i wasn't highlighting the problem/expression.
BTW, it works with the stickies too. it just sucks that it launches applescript.
Yeah, launching AppleScript is clunky. I understand doing it for the evaluation of an actual script, but there should be a calc service that evaluates expressions without resorting to AppleScript.
|
Dennis R. Metzcher
MyMacBlog.com: My experiences with the Mac OS, a switcher's point of view. With a new Mac tip each week day.
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jul 2006
Status:
Offline
|
|
Originally Posted by JKT
Install CalcService instead and see if it works (link is toward the bottom of that page).
Thanks! I've installed it. I'll test it in a few.
|
Dennis R. Metzcher
MyMacBlog.com: My experiences with the Mac OS, a switcher's point of view. With a new Mac tip each week day.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status:
Offline
|
|
If you don't have CalcServices installed, Command-Shift-8 (or, more specifically, Command-*) is assigned to the Script Editor -> Get Result of AppleScript service menu.
As a result you can select any text that's valid AppleScript and invoke it via Command-Shift-8.
For example, select the text:
beep 2
and Command-Shift-8 and you'll hear two beeps.
|
Gods don't kill people - people with Gods kill people.
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status:
Offline
|
|
CMD-* with beep 2 doesn't work.
Calc Service: beep 2
Result: Syntax error
-t
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2001
Location: Helsinki, Finland
Status:
Offline
|
|
Originally Posted by what_the_heck
It appears you do have CalcServices installed and mapped to CMD-*.
The 'beep 2' thing was supposed to work with the default 'AppleScript' thing, not CalcServices.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2001
Location: Kansas City, Mo
Status:
Offline
|
|
That is a nice trick. Works great in the Google search bar.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 2003
Location: Somewhere
Status:
Offline
|
|
How's doing this any easier or faster than the dashboard calculator. If I have to download and instal an app to do that then it's not all that cool. We all can't be that lazy that we need to find a shortcut to calculator functions.
|
iMac 24" 2.8 Ghz Core 2 Extreme
500GB HDD
4GB Ram
Proud new Owner!
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Originally Posted by hldan
How's doing this any easier or faster than the dashboard calculator.
It doesn't suck up a ton of memory and require you to wait 30 seconds for Dashboard to load. Just off the top of my head.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, España
Status:
Offline
|
|
Originally Posted by kcmac
That is a nice trick. Works great in the Google search bar.
Yeah, just press enter and *bingo* instant answer
V
|
I could take Sean Connery in a fight... I could definitely take him.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2001
Status:
Offline
|
|
works with quicksilver's text entry too. Activate quicksilver, press "." and type. I love QS more and more each day.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Mar 2000
Status:
Offline
|
|
This is so cool! Now we can paste scripts to each other, mark the script and hit cmd-*
Mark the bold text below, and hit cmd-*
tell application "Safari"activate
set di to display dialog "Where do you want to go today?" default answer "http://www.microsoft.com"
open location text returned of di end tell
(Although I get a 20 second stall when I do this...)
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by cla
(Although I get a 20 second stall when I do this...)
Me too. Strange Safari lag.
|
•
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: Chile
Status:
Offline
|
|
has to do with the keyboard layout (at least for me that was the problem). Changing it to English did the trick.
Alternatively you can use the asterisk on whatever key that your layout has it, or use the one on the keypad to avoid changing layouts.
|
:: frankenstein / lcd-less TiBook / 1GHz / radeon 9000 64MB / 1GB RAM / w/ext. 250GB fw drive / noname usb bluetooth dongle / d-link usb 2.0 pcmcia card / X.5.8
:: unibody macbook pro / 2.4 Ghz C2D / 6GB RAM / dell 2407wfp - X.6.3
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jan 2005
Location: New Zealand
Status:
Offline
|
|
That's a cool feature. Thanks for mentioning it!
|
MBP 15" C2D 2.2GHz 4.0GB 500GB@5400
iPhone 4 32GB Black
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Originally Posted by cla
This is so cool! Now we can paste scripts to each other, mark the script and hit cmd-*
Mark the bold text below, and hit cmd-*
tell application "Safari"activate
set di to display dialog "Where do you want to go today?" default answer "http://www.microsoft.com"
open location text returned of di end tell
(Although I get a 20 second stall when I do this...)
We were always able to do that, though.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Ah, I remember that exploit.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Sep 2001
Status:
Offline
|
|
Ah! Very cool. I never knew.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|