georgexsh Posted December 23, 2017 Share Posted December 23, 2017 (edited) If Dictionary.app window is opened in desktop space Window 1, now switch current space to Window 2, launch Alfred, fire action "define hello", the desktop space stays at Window 2, won't change focus to Dictionary.app window in Windows 1 as desired. Alfred 3.5.1, macOS 10.13.2 Edited December 23, 2017 by georgexsh Link to comment
Vero Posted January 10, 2018 Share Posted January 10, 2018 @georgexsh This is a macOS shortcoming, which you would experience as well if you were to type "dict://hello" into Safari; MacOS doesn't change to the appropriate Space in that situation either. Resolving this is not as simple as Alfred launching the command to define the word, followed by bringing Dictionary to come into focus, as some users may be using the "dict://" URL scheme to launch a different dictionary application from the default macOS one. In that case, launching the word definition (in their chosen app) then bringing Dictionary into focus would create unwanted, confusing behaviour. Having said that, you can easily replace the "define" keyword with a small workflow that opens the "dict://{query}" in your default Dictionary, followed by an object launching the Dictionary app (which should bring you to the right Space if it's already launched). You can then disable the default "define" keyword in Features > Dictionary. I'm moving this to Discussion & Help, so let us know if you need any help creating the workflow described above Cheers, Vero Link to comment
georgexsh Posted January 12, 2018 Author Share Posted January 12, 2018 @Vero thansk for your very detailed reply! Now I am trying to write my first workflow! Link to comment
georgexsh Posted January 12, 2018 Author Share Posted January 12, 2018 Note, simply launch "Dictionary.app" is not enough to bring its window to the front, you have to use apple script, like: tell application "Dictionary.app" activate end tell 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