Jump to content
abbood

how to create a workflow for actions within alfred itself

Recommended Posts

I use the feature of adding custom urls to alfred many times a day.. to the point where I would really like to do it as a hotkey. 

 

This is what I do manually

1. hit my alfred launch hot key <kbd>⌘</kbd>

2. hit bottom key 3 times to go to web search

3. click on add custom search button

4. fill in the details of the page

5. use mouse to click on save

 

Is it possible to have an alfred hot key that simply launches a prompt where i enter simply the url and the keyword.. click on enter and that's it! 

 

if not possible is at least possible to have a hot key to launch the last screen where i immediatly add a new custom search? 

 

 

Alfred Preferences 2017-01-24 06-59-18.png

Alfred Preferences 2017-01-24 07-02-20.png

Screen Shot 2017-01-24 at 7.02.59 AM.png

Edited by abbood
finish question

Share this post


Link to post

Briefly,

Option1 :

The searches are stored in Alfred.alfredpreferences/preferences/features/websearch/prefs.plist

You'd need to write a workflow that calls a script to add an item to the plist.  

 

Option 2:

Use UI scripting (in AppleScript or JXA) to push the particular buttons etc.

Share this post


Link to post

Generate an alfred://customsearch/ URL.

 

To see one, double-click on a Web Search and click "Copy URL for sharing". Here's the Custom Search URL for my TheTVDB.com Custom Search:

alfred://customsearch/Search%20TheTVDB.com%20for%20%27%7Bquery%7D%27/tv/utf8/nospace/http%3A%2F%2Fthetvdb.com%2F%3Fstring%3D%7Bquery%7D%26searchseriesid%3D%26tab%3Dlistseries%26function%3DSearch

To install the search, open the URL (with an Alfred Open URL action or open alfred://customsearch/... etc.)

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...