mjking Posted October 14, 2013 Share Posted October 14, 2013 On the web search it would be nice if you could set a fallback URL if no arguments are entered. For instance if I type "gm Seattle, WA" it will search Google Maps for Seattle. If I just type in "gm" it would go to a fallback URL. I realize that I can create a second custom search that opens Google Maps when I type gm, but then you are forced to select the action you would like with the up/down arrow keys. It would be faster if it was all built into the web search options. Link to comment Share on other sites More sharing options...
jdfwarrior Posted October 14, 2013 Share Posted October 14, 2013 On the web search it would be nice if you could set a fallback URL if no arguments are entered. For instance if I type "gm Seattle, WA" it will search Google Maps for Seattle. If I just type in "gm" it would go to a fallback URL. I realize that I can create a second custom search that opens Google Maps when I type gm, but then you are forced to select the action you would like with the up/down arrow keys. It would be faster if it was all built into the web search options. You could just create a simple workflow that would be the same keyword "gm" that accepts no argument and opens Google Maps That way, you could type "gm seatle, wa" and it would search google maps, or you could just type "gm" and it would open Google Maps. With it set to "no argument" then, as soon as you pressed <space> after "gm" the workflow version would disappear from the available actions Link to comment Share on other sites More sharing options...
mjking Posted October 14, 2013 Author Share Posted October 14, 2013 Thank you. I tried that and it worked. I still think it is worth considering this as a feature in the future. Instead of having a custom web search and a separate custom workflow for every site that you want to open or search, you could combine it into one custom search or one custom workflow. It would be easier to maintain a list of keywords and sites. Take a look at shortmarks.com. I think this is a good example of what could be done. For each keyword they have a direct link if there are no arguments and a search link if there are arguments. Link to comment Share on other sites More sharing options...
jdfwarrior Posted October 14, 2013 Share Posted October 14, 2013 Thank you. I tried that and it worked. I still think it is worth considering this as a feature in the future. Instead of having a custom web search and a separate custom workflow for every site that you want to open or search, you could combine it into one custom search or one custom workflow. It would be easier to maintain a list of keywords and sites. Take a look at shortmarks.com. I think this is a good example of what could be done. For each keyword they have a direct link if there are no arguments and a search link if there are arguments. Well technically, I forgot if you don't include {query} in the URL, you could do this with a custom search as well. But that would just mean that you have 2 custom searches per site setup. Or, you could have single workflow that would do dual purpose but then that requires a small script for each. You would just make an Optional Argument in a workflow and then check the value of the argument. If it's blank, use url 1, otherwise, use url 2 Link to comment Share on other sites More sharing options...
mjking Posted October 14, 2013 Author Share Posted October 14, 2013 I think the script may be the way to go. The dual workflows do the job but it still isn't ideal. If I setup a workflow with the keyword "gm" and no argument it will open google maps. The problem is if I search "gm Seattle" the next time I type the keyword "gm" Alfred will default to the search workflow and I need to switch to the other workflow. If it is all in one workflow with an if/then statement it would be smart enough to figure out what the user wants. I'll see if I can figure out the scripting with your PHP library. Thanks for the guidance. Link to comment Share on other sites More sharing options...
jdfwarrior Posted October 14, 2013 Share Posted October 14, 2013 I think the script may be the way to go. The dual workflows do the job but it still isn't ideal. If I setup a workflow with the keyword "gm" and no argument it will open google maps. The problem is if I search "gm Seattle" the next time I type the keyword "gm" Alfred will default to the search workflow and I need to switch to the other workflow. If it is all in one workflow with an if/then statement it would be smart enough to figure out what the user wants. I'll see if I can figure out the scripting with your PHP library. Thanks for the guidance. I can throw together an example really quick if you'd like? Then you could just duplicate it for whatever searches you wanted Link to comment Share on other sites More sharing options...
jdfwarrior Posted October 14, 2013 Share Posted October 14, 2013 I think the script may be the way to go. The dual workflows do the job but it still isn't ideal. If I setup a workflow with the keyword "gm" and no argument it will open google maps. The problem is if I search "gm Seattle" the next time I type the keyword "gm" Alfred will default to the search workflow and I need to switch to the other workflow. If it is all in one workflow with an if/then statement it would be smart enough to figure out what the user wants. I'll see if I can figure out the scripting with your PHP library. Thanks for the guidance. Example: http://cloud.dferg.us/GTXv Link to comment Share on other sites More sharing options...
mjking Posted October 14, 2013 Author Share Posted October 14, 2013 That works perfect. Thank you. Link to comment Share on other sites More sharing options...
gtbcb Posted September 30, 2016 Share Posted September 30, 2016 (edited) @jdfwarrior - your link above no longer works. Can you provide similar code? Thanks! Roll Tide. Edited September 30, 2016 by gtbcb Link to comment Share on other sites More sharing options...
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