Jump to content
vitor

Script Filter Rerun sends selection to top, even if unrelated items are present

Recommended Posts

If we have a Script Filter with a rerun, Alfred’s selection is sent back to the top every time the rerun triggers. I can see the reasoning: if the information is updating from under your feet, the position where you had your selection is irrelevant.


However, this also happens when you have more than the Script Filter visible. Consider the following Workflow. I’ve picked dp as the Keyword because it matches a bunch of other stuff by default:


X3S0Rpp.png


Run dp and we see the date being updated automatically in Alfred. We’re free to select any of the other results and the Script Filter keeps updating, but the selection is sent back to the top of Alfred’s results on the next rerun if we select the Script Filter. That’s unexpected and makes it hard to action the Script Filter itself, because the selection may slip from under us.


Seems like Alfred’s selection shift should go to the top result of the Script Filter, not Alfred’s top result. It is, however, a minor annoyance of low priority.


Alfred 4.0.8 [1135]
macOS 10.14.6 (18G3020)

Share this post


Link to post
2 hours ago, vitor said:

Seems like Alfred’s selection shift should go to the top result of the Script Filter

 

Hmm. Could be the user doesn't want to use the Script Filter, though, so you'd have the same problem of the selection jumping away from the item you're after.

 

Perhaps it'd be better if the selection remained in the same place (i.e 2nd item, 3rd item etc.) when a rerun fires?

Share this post


Link to post

This is because the item is missing the UID, so Alfred doesn't know it's the same item. If you set a UID, then Alfred will keep the selection:

 

cat << EOB
  {
    "rerun": 1,
    "items": [{ "title": "$(date)", "uid": "date-uid-1234" }]
  }
EOB

 

Share this post


Link to post

Makes sense and works well! It’s been a while since I’d found a good use for the UID.

 

But that still doesn’t affect

does it?

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