Jump to content

APS

New Member
  • Posts

    8
  • Joined

  • Last visited

  • Days Won

    1

APS last won the day on September 16

APS had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

APS's Achievements

Helping Hand

Helping Hand (3/5)

3

Reputation

  1. @FireFingers21 Hey, thanks for whipping that up! In the end, I decided to try my own hand at it, for two reasons: for one, I always try to make workflows without any dependencies--to keep things clean, simple, and transposable; and second, because I think problems are great opportunities to learn new things (despite me wanting an easier out initially by creating this thread 😅) The good news is that I was able to solve my problem! This was my first time writing anything in Bash, so any feedback is welcome. Perhaps I could use better methods or clean up the logic. @Stephen_C Thanks for the link from StackOverflow you posted. I used the method described to retreive tagged files from the system. Much appreciated. Okay, here is my script. As mentioned, it works perfectly, but let me know if it can be better in someway. If not, then I hope it can help someone else out in the future. # Specify Tag to Show tag="Example" tagColorEmoji="🟢" # Initialize an array that will be comprised of Script Filter rows filterRowsArray=() # Get a list of tagged items (as file paths) taggedItems=$(mdfind "kMDItemUserTags == $tag" -onlyin ~/) # Loop through each tagged item to contruct a row object (as a string) and add to filterRowsArray. while IFS= read -r file_path; do filterRowsArray+=("{ \"title\": \"$(basename "$file_path")\", \"subtitle\": \"$tagColorEmoji $tag\", \"arg\": \"$file_path\", \"type\": \"file\", \"icon\": { \"type\": \"fileicon\", \"path\": \"$file_path\" } }") done <<< "$taggedItems" # Convert the filterRows array to a comma-separated string (JSON) filterRowsJSON=$(IFS=,; echo "${filterRowsArray[*]}") cat << EOB {"items": [$filterRowsJSON]} EOB
  2. This is all so great. I actually was unaware of the Window Behavior settings (well, I was somewhat aware of it, but thought it was checked for flickering issues), but that clearly is the right solution here. It explicitly tells Alfred to look out for subsequent steps and acts accordingly. Duly noted henceforth! But what's so great is not only the solution to my problem, but honestly the incredible, thoughtful help I received from Stephen, Vero, and Vitor. Alfred is probably my favorite (and most used) 3rd Party app; it naturally follows that the lovliness of the app is a reflection of the amazing devs behind it and that this lovliness extends beyond its bounds to create a wonderful community around it. Cheers all around!
  3. @vitor Vitor, your suggestion works! And after further testing, adding a delay between the Args/Var and the empty keyword input (even as low as 0.1 seconds) also solves the issue. Given these solutions, I'm curious as to what the underlying problem is. Is Alfred 5.5 more efficient than prior versions and is tripping over itself? But then why is my machine the only one affected here? (FYI I have a MacBook Pro with M1 Pro.)
  4. Huh, yeah it still not working for me. Your workflow and the 'Simple To-Do List' example workflow--both of which empoly emtpy keywords--are working fine. But any Workflows I have made in the past or create now doesn't work. Very strange. Even stranger is this: if I connect the keywords objects together (see picture below), it works. That's actually the only way I've gotten it to work, but that flow is inoptimal and unexpected. Oh, and my Alfred preferences are stored in local folder on my Mac.
  5. Stepehen, you're exactly right. I'll need to use shell script and then the JSON format to use with Script Filter to get to where I need to go. I figured as much, but thought I'd ask the forums to see if this sort of script has already been written. I'll take a look at your workflow to get grips on the shell scripting. Much appreciated! If anyone has a script that achieves something similar, that too is appreciated! In the meantime, I'll write my own and see how it goes.
  6. Hey Stephen, thanks for your response! I downloaed your (excellent) Workflow and, like you said, it's working perfectly fine. Furthermore, I downloaded the Simple To-Do List workflow by the Alfred team in Gallery (used to help Alfred users learn how to use varius workflow objects) and that too has empty keyword objects working correctly. And yet, my workflows are not functioning anymore. I think you're right; uploading and sharing my Workflow will probably help daignose what exactly is going wrong: https://www.dropbox.com/scl/fi/jq90l144aoug9wgo6d5li/Example.alfredworkflow?rlkey=t8vudfv9qkwmbhaa7pyrbwv20&st=hzgsqmx7&dl=0 I really appreciate all the help :)
  7. Hello everyone, This is an idea I've had for a while, but I'm just unable to figure out how to write an appropriate script for. What I want to achieve is this: use keyword (argument optional) to present list of all files with a particular tag (preferabbly viewable in Alfred 5.5's grid view), and where any arugment passed filters the results. What I've been doing for the last few years is using a File Filter, where the Field is limited a particular value of kMDItemUserTags (the value being the tag name). And this has been working, but it has the following drawbacks: After keyword input, no files are displayed until and argument is given (this is inherent to File Filter). So typically, I've been passing `.` to see all files with a particular tag, which is not only inconvenient, but also inelegant. File Filters results utilize standard list view, whereas I think its preferable to view the results in the grid view. I don't think this is too hard to do, but I'm not really sure where to begin. Any help would greatly be appreciated. Thank you in advance!
  8. Hello everyone, Longtime Alfred user (and longtime Forum lurker) here. It was time I joined the community officially :) As my first post, I was wondering if anyone could help me with a bug/issue I'm having with Alfred 5.5 and empty keywords. For a few of my workflows, I follow-up a Keyword input or List Filter object with an empty Keyword input as a method to “ask” a user for additional information (and then I save that input with a subsequent Args/Vars utility). I’ve seen this method detailed in the past as the best way to store additional information during a workflow (see this thread as just one example). And I’ve successfully been doing it this way for years. However, after the 5.5 update, it appears like this method doesn’t work anymore. When my workflows hit that step, nothing happens now (the Workflow essentially stops dead in its tracks). I've attached an Exmaple workflow that illustrates the issue. Please take a look. Has anyone experienced this as well? Or perhaps this is a deprecated technique now? If so, is there an alternative way to ask a user for additional information during a Workflow? (Though I’m well-versed on writing scripts, that seems like overkill and cumbersome; I liked the ease and simplicity of using an empty Keyword.) Thank you for your time and assistance in this matter. It is much appreciated. APS
×
×
  • Create New...