On Jun 16, 2014, at 5:57 PM, Bill Vlahos < email@hidden> wrote: I’ve successfully written an Automator service (with an embedded AppleScript) that uses data detectors for phone numbers. I can hilite a phone number in any application, right click on it and the service will make the softphone dial it.
I thought that detection was basically baked in at this point. I don't do a lot of from-screen dialing, so I guess it's not. (It is in iOS of course.)
The only problem is that Mavericks requires the user to set permissions on programs like Safari (Security and Privacy System Prefs) to let that application control the computer. The Automator task knows how to do it from any program but security prevents it from working in any program without setting the permission.
Why does an application need to "control the computer" to send a text string to your phone dialer? Won't the clipboard work?
If I selected some text and invoked a service and suddenly it seemed as if Safari wanted to (was asking) control my computer I'd be a wary.
Do you mean something about Assistive Services?
This has two problems for me. 1. It is inconvenient for the user to have to do this and detracts from the feature to be able to hilite any number on screen and easily dial it.
A one-time permission change doesn't seem very inconvenient.
2. I don’t really want to give programs like Safari the ability to do this as it might open up other vulnerabilities from Safari.
To do what, exactly? It's unclear why Safari (or TextEdit or Pages or...) needs to be involved at all. Isn't the transaction between a found (selected) text string and your dialer?
If I just have an AppleScript application do this there are no permissions issues. Unfortunately drag and drop on AppleScript droplets are only for files or folders in the Finder so I can’t drag and drop a phone number onto it.
Any suggestions on how to make this work smoother?
Based solely on your last thought -- dropping a selected text -- then I think Smile could be useful here. (I think Smile can take a selected text clipping as a drop, anyway. I only drop files and folders, so I'm not sure what objects it accepts. I can look.)
You would build a very basic window that can accept dropped text. It may or may not have a text field...which, if the window can't take dropped text clipping, the text field would. It could have a button to "Dial" (or it could act right away, as you desire) and even other buttons, like "Add to contacts" or "Call later" or whatever.
If you have your script working as you want, then this would be a 30-minute project.
-- Gary |