zjn0505 Posted April 25, 2019 Share Posted April 25, 2019 Currently in Script Filter, I didn't assign uid to items, so they are arranged in the order of `add_item`. Is there a way to pin one item on the first place and assign uid to others and enable auto-sort to them? Link to comment
deanishe Posted April 25, 2019 Share Posted April 25, 2019 5 hours ago, zjn0505 said: Is there a way to pin one item on the first place and assign uid to others and enable auto-sort to them? Afraid not. If any items have UIDs, Alfred will apply its knowledge to them, and if it associates them with the entered query, will probably bump them to the top. What exactly are you trying to achieve? Link to comment
zjn0505 Posted April 26, 2019 Author Share Posted April 26, 2019 (edited) In my use case, I'm doing a tcpip connection to the ip address input as {query}, which is listed as the first item. Also I will save the history of connections, and show them starting from the 2nd place. When those items are selected, it will start to connect as well. It's the history section that I hope to utilize Alfred's auto-sort feature. Now, I just sort by the reading timestamp of last used from db. Edited April 26, 2019 by zjn0505 Link to comment
deanishe Posted April 26, 2019 Share Posted April 26, 2019 Hmm. What I would probably do there is leave UIDs on as long as the user’s query isn’t a complete, valid IP address and turn them off as soon as it is. So it first works as a query to filter the history using Alfred’s sorting, but if the query is a complete IP address, that’s shown as the top result (“do X with xx.xx.xx.xx”) while the history is shown below sorted by length of prefix match. So if you enter “10.0.0.1”, “10.0.0.10” should be at least near the top where you can action it with CMD+<NUM>. Not so good if you’ll have whole subnets in the history, I suppose. zjn0505 1 Link to comment
zjn0505 Posted April 26, 2019 Author Share Posted April 26, 2019 Nice solution, all the aspects covered. Thank you. 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