Jump to content

Add single execution script "filter"


jvdneut
 Share

Recommended Posts

Hi,

 

I've just created my first workflow (http://www.alfredforum.com/topic/653-menu-bar-search/) for searching the system's menu bar.

 

The main problem that I encountered here is that Alfred executes my script for every keystroke. I would prefer if Alfred could execute my script only once and then have it filter the results based on it's regular "fuzzy" search. This would make my workflow a whole lot faster.

 

Another thing that might be useful is to allow static XML files to be used as input for a workflow. This would allow me to define a bunch of snippets for example in an XML file and have Alfred search them and copy them to the clipboard.

 

Finally, I also think it would be useful if workflows could be initiated without keywords, but simply displayed as entries in Alfred's initial search.

 

 

Jeroen van der Neut

@jvdneut

Link to comment
Share on other sites

Hi,

 

I've just created my first workflow (http://www.alfredforum.com/topic/653-menu-bar-search/) for searching the system's menu bar.

 

The main problem that I encountered here is that Alfred executes my script for every keystroke. I would prefer if Alfred could execute my script only once and then have it filter the results based on it's regular "fuzzy" search. This would make my workflow a whole lot faster.

 

Another thing that might be useful is to allow static XML files to be used as input for a workflow. This would allow me to define a bunch of snippets for example in an XML file and have Alfred search them and copy them to the clipboard.

 

Finally, I also think it would be useful if workflows could be initiated without keywords, but simply displayed as entries in Alfred's initial search.

 

 

Jeroen van der Neut

@jvdneut

 

1. It fires on every keystroke to match the filtering that is found in the regular, non workflow searches. It makes it perform more as a filter than a, enter in all your text and then search. This has been discussed numerous times already and been suggested quite a few times here already as well. The current method of execution works well. One way we have suggested to resolve issues like this is, in your code, restrict the execution of the code until the input string reaches a specific length. In other words, Don't perform the search until after the input is at least 3 characters long. By doing that, when your script does actually fire and search for matches, the number of potential matches should be a smaller and help improve execution time. Another thing you could do is cache the results and search the cache as opposed to performing a full search every time

 

2. As long as its formatted to match the style that Alfred uses, you can make it just use the contents of a file, however, Alfred won't be performing the search, that would still be on you. This could easily be done with a workflow though. 

 

3. Having a bunch of stuff just randomly listed in Alfred's initial search would probably not result in the best user experience because, even when that's NOT what you are looking for, you will have this random group of things cluttering up your results. If you set good keywords, and after you've used those workflows a few times, Alfred learns that you prefer those items and you could start actioning them by typing only 2-3 letters. I know typing 2-3 letters sounds like more of an inconvenience than not typing at all, but if they were to show up, then you have to arrow 2-3 times to get to the actual result you are looking for. It also requires you to watch the results to see which on you have to select. Also, another option would be to create a workflow that has all of these items in it that you wish to have quickly/easily visible, then set the keyword of all of them to maybe, a comma? Then when you could open Alfred and just type a comma and have all those results listed.

Link to comment
Share on other sites

I would be perfectly happy implementing a cache. This would be a whole lot easier if Alfred gave me something to work with though. If it could pass a "instance identifier" that would change every time the workflow was entered (or Alfred was displayed/hidden even) that would be perfect.

 

With respect to having a bunch of things listed in Alfreds initial search: I did not mean to list the entries retrieved by the workflow, but the workflow itself. In my case this would be "Menu bar search", not the actual menu bar items. This is something I could live without, but would probably make having many workflows easier to work with.

Link to comment
Share on other sites

I would be perfectly happy implementing a cache. This would be a whole lot easier if Alfred gave me something to work with though. If it could pass a "instance identifier" that would change every time the workflow was entered (or Alfred was displayed/hidden even) that would be perfect.

 

With respect to having a bunch of things listed in Alfreds initial search: I did not mean to list the entries retrieved by the workflow, but the workflow itself. In my case this would be "Menu bar search", not the actual menu bar items. This is something I could live without, but would probably make having many workflows easier to work with.

 

It's early days yet. I expect a lot more script support will come out in the 2.x series. But everything's getting locked down for 2.0.

 

A bunch of people (myself included) have asked for timeouts, so script execution only happens when a key hasn't been pressed for x ms. An instance id would also be very useful, you should make that request in the request forum.

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...