Jump to content

Postfix commands in alfred


40-02
 Share

Recommended Posts

Hi there:)

I'm big fan of alfred app. I use it with great love.

I think, it would be great if Alfred had option to write commands not only as a prefix, but after query, as a postfix.

For example, I started writing query to look for it it in google in a default fallback. But I changed my mind and decided to look for information on google images. 

The only way that I have now is to use command + cursor back and adding "images". 

But I think it would be great if there was an option to write some symbol, or simple operator (for example two dots after my query) and treat all that follows this two dots as a start of line (and all the following words as a alfred operator).

For example I wanted to search "Alas, poor Yorick! I knew him, Horatio” not in google but in my text files, therefore I would add to query 
Alas, poor Yorick! I knew him, Horatio .. in

And alfred would understand that I want to look for a string in file

Link to comment
Share on other sites

I use a lot chrome history 

http://www.alfredforum.com/topic/3443-search-google-chrome-history/

and chrome bookmarks workflows

http://www.alfredforum.com/topic/114-chrome-bookmark-search-workflow/page-3

 

Sometimes, mostly if I havent found query, I need to change keyword to use another workflow

With postfix notation I would be able to do it easely. 

 

for example I've tried to find 

alfred postfix .. bookmarks 

 

But I havent found it in bookmarks, so I delete bookmarks and write

alfred postfix .. ch

 

And alfred would give me link on this thread.  

Link to comment
Share on other sites

  • 2 months later...

As well It might use brackets like this, just to get the chosen suggestion from that workflow (mailto in our case), and put it automatically into gmail search workflow (gms). 

 

It would be a great help:)

 

Fullscreen-06-03-14-07-03.png

Link to comment
Share on other sites

<_< Why isn't my workflow complaining about that address? That's a bug, dammit!

The problem with a postfix command is that it would likely mess with workflow input.

The difficulty is finding a syntax that is

  • easy to use, i.e. an sensible delimiter and
  • entirely unheard of in the context of a query, so it won't mangle workflow input.
I suggest a workaround. The following AppleScript simulates ⌘←, ⌥⇧→:

 

tell application "System Events"
key code 123 using {command down}
key code 124 using {option down, shift down}
end tell
If you have FastScripts or Keyboard Maestro, you can save it as an AppleScript and assign it a keyboard shortcut, otherwise you can create a Service with Automator and assign that a keyboard shortcut.

Then, when you want to change an Alfred prefix, hit your keyboard shortcut and the first word in Alfred's query box will be selected, so you can overwrite it with your new command.

Link to comment
Share on other sites

  • 2 weeks later...

I suggest a workaround. The following AppleScript simulates ⌘←, ⌥⇧→

I use a similar solution in my RenameAction workflow. However, that would not work for every case in this instance since Alfred commands can have spaces in them; that is not widely used (or at all), but it is possible.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...