jonteamere Posted November 12, 2014 Share Posted November 12, 2014 As a medical student, I come up against a lot of words in my studies that I have no idea how to pronounce. Before Alfred, I would open Safari, go to www.howjsay.com and copy/paste the word into their search bar. With Alfred, I've been able to set up a custom howjsay search that includes that whole {query} replacement thing. I was wondering if there was a way to set up a workflow that makes use of currently selected text to do the same search on howjsay. I thought that maybe instead of using {query} there would be a trigger for selected text, but I haven't been able to find anything. Any thoughts? Link to comment
deanishe Posted November 12, 2014 Share Posted November 12, 2014 Grabbing selected text from an arbitrary application doesn't work very well, as there isn't a universal method for doing so.What you can do is trigger an AppleScript that will do a Copy for you: tell application "System Events" keystroke "c" using command down end tell set theText to the clipboard as Unicode text Now the selected text is on the clipboard. It's also in the theText variable if you want to process it further in AppleScript. Link to comment
Florian Posted November 12, 2014 Share Posted November 12, 2014 Is it is helpful in any way, applescript also has a "say" command Link to comment
deanishe Posted November 12, 2014 Share Posted November 12, 2014 I've just given that a try with the few medical terms I know, and it does a fairly good job, you know… Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now