Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Jasondm007

  1. @Andrew I'm not sure if this is a bug or a related feature request, but I was wondering if the "Browse in Alfred" object's new stacking option could escape back to the last visible Alfred window? For example, if you have a Junction or Replace object between a File Filter or something else that you've got connected to the Browse object, the new stacking option won't escape back to the File Filter (e.g., (1) File Filter, (2) Replace, (3) Browse in Alfred). Thanks again!
  2. @deanishe I can't thank you enough for all your patience and helpful explanations. I was completely confused by the order of operation, and ready to throw in the towel last evening. But, thanks to your help, I finally have everything working - which is super helpful for me to build from, etc. Thanks a ton! For others that may see this in the future, I made one minor change to the script above. After noticing that it was matching trailing spaces in a way that differed from Alfred's usual filtering, I just added a line to remove them. So, now the upper portion reads some
  3. Hahaha @deanishe Your script looked so "simple" to me, that I thought you published Google's search algorithm or IBM Watson's thoughts In layman's terms, I wanted the script to perform exactly how it usually does, with the only exception being that I wanted to be able hit a modifier key ⌘ that would pass my current query to another script, in circumstances where I wasn't able to find what I was looking for. Because I haven't had any success implementing things, at the moment, I just let Alfred do the filtering and have my modifier pass an empty argument - which gets me wh
  4. Sure thing,@Andrew - I think the new workflow feature is fantastic! I'm glad to hear that you'll be adding some version of it to the default navigation options, too. Even if it's the more simple version, with a checkbox, that's great news! Thanks a ton.
  5. @deanishe Thanks for getting back to me. I appreciate your suggestions, but I'm afraid this stuff is way over my head. Honestly, your "simple" example almost made my head explode. And I really don't understand where to even add the code that you suggested. I really didn't want to try to do the filtering myself. But I was under the impression that I had to, if I wanted to capture the query? When Alfred does the filtering, the script only runs once - which makes it impossible to capture the query, right? (unless you require the argument beforehand, etc.) Is there a way th
  6. @Andrew The new view stack option, which allows users to define the escape behavior of the Browse object, was a brilliant addition to version 4.3.2! And, I was wondering if you'd be willing to take things a litte further? Namely, would you consider adding this option to Alfred's default navigation settings (File Search > Navigation)? When using Alfred's normal and quick file search modes, I regularly find myself dipping into a document or a folder to find something, and then wanting to escape right back into the query (because I didn't find what I was looking for).
  7. @deanishe Got it! Thanks for your patience, and excellent explanation above. This all makes perfect sense (now, anyways 🤦‍♂️️)! So, if I'd like to pass my query, how do I get my script to filter the results as the user inputs their query (similar to Alfred)? In layman's terms, how do I get the script filter to remove items from Alfred's visible output as the user inputs their query (based on the "match" criteria)? As you correctly pointed out, my script just dumps all of the results into Alfred - meaning that they all just kind of sit there. Is this update as easy as ad
  8. @deanishe As usual, you're absolutely right! Unfortunately, this issue is probably beyond my limited python skillset. After doing some research into what you suggested, I incorporated an IF statement that adds the query or just an empty placeholder for the argument: if len(sys.argv) < 2: theQuery = "" else: theQuery = sys.argv[1] Then, I just set the mods as follows: "mods": { "cmd": { "subtitle": "Text Here", "arg": theQuery, "icon": {"path": "iconhere.png"}, }, }, Is this what you had in mind? Or is there a better approach?
  9. @deanishe Sorry about that! I should have thought to include the error message. Code 1: Traceback (most recent call last): File "/Users/jasonjohndumont/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/96A60515-7183-4C13-8C1F-1D650947A1C7", line 36, in <module> "arg": sys.argv[1], IndexError: list index out of range Thanks again!
  10. @deanishe Thanks for getting back to me. Unfortunately, the script errors out when running it with 1 as the value. Is there a certain type of run behavior, etc., that I should also use? Or, am I missing something else? Thanks again for all of your help! "mods": { "cmd": { "subtitle": "Favorites Only", "arg": sys.argv[1], "icon": {"path": "fam1.png"}, }, },
  11. Hi @vitor - Thanks for getting back to me! When I tried your recommended approach, the goods news is that it didn't error out, like many of my previous attempts. Unfortunately, it's giving back a a file path to one of Alfred's caches: /Users/USERNAMEHERE/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/73159C6F-2F8B-4397-AB51-EC5326BC69A8 I have "import sys" up at the top, as you indicated. Any other ideas what I might be missing? Thanks again for all of your help!
  12. @deanisheI have a quick question that relates to an iteration of script above, but is, more generally, related to the way that script filters operate. I was wondering it is possible to capture or pass-on the user's initial query/input (i.e., as the argument itself)? For example, if you wanted to add a modifier/mods to the JSON output whose argument/arg is just the user's query, would this be possible? I tried several versions of the following JSON lines, but the script filter always just passes the {query} on as a string (i.e., not the actual query that a u
  13. Any chances this coming soon, @Andrew? 🙏️ Thanks for your consideration!
  14. Although I was really happy to see the sorting option dropdown added to the "Browse in Alfred" action, it's pretty limited. @Andrew Is there any way we could get a few more options added to the dropdown? Personally, I'd love to see "Date Added" as an option. Thanks for your consideration!
  15. @nikivi I was looking for a solution to a different problem when I came across your post. In short, I struggled with the same clipboard/image issue in the past, and wound up making a simplistic workflow that dumps the most recent clipboard entry on the desktop as a jpg. It's hardly perfect, but it might help you get by until Alfred adds a more interactive clipboard. In any event, I've uploaded it for you here: https://gofile.io/d/AeWYKH Although it only works with the most recent clipboard entry, you could always add an argument to the front that allows yo
  16. @svinter Sorry for the slow response. Unfortunately, I don't think there's been any traction with this specific issue or the more broad one, concerning access to built-in workflows. I've begged for this in the context of file actions, a few times, but no luck ... just quite yet. 🙏 @Andrew
  17. @deanishe Thanks for taking a look at it again. As usual, your suggestion worked perfectly! I'm looking forward to going back and updating some of my other scripts. Thanks a ton!! @vitor Thanks for the editor suggestion, too. I just installed Visual Studio Code, and it's output is definitely a lot easier to see than working directly in Alfred or using Atom or BBEdit. Thanks!! By chance, do either of you guys have any suggestions for resources or tutorials for python newbies who would like to do a little tinkering in Alfred, etc.?
  18. @deanishe Thanks again for all of your help. And, for the editor suggestions, too! I haven't tried either of those editors yet, so I'll check them out. Much appreciated! As for script itself, I'm afraid that I keep getting the same string indices error. I've included the script below, and uploaded a test workflow at the link provided. My apologies for not uploading the workflow earlier. I didn't think there'd be enough people with DEVONthink to have any interest (or people to test, for that matter). In any case, thanks again for any help you can lend! Download Test Workflow
  19. @deanishe Thanks a ton for getting back to me. This is super helpful! Although I've run into this issue on several occasions, this post was prompted by my frustration trying to modify a portion of Charles Ma's workflow (which I had originally changed to read a different plist file in DEVONthink). I tried implementing your suggestions in a couple of different ways, but am running into similar errors as before. I've included one such iteration below. The line that is commented out is essentially where the script used to stop. I assume I'm implementing the "for" loop incor
  20. I have a very basic python question that I was hoping to get a little help with that involves filtering out list items in a script filter. At the moment, the script filter works great except that it includes a few items I'd prefer not to see in Alfred's output. Is there any easy way to remove items whose titles can be found in another list? Admittedly, I normally do these sorts of things in AppleScript - which is pretty easy to do in this case - except that I’ve been trying to learn a little python, given all of the limitations with AppleScript (which @deanishe and @vitor have righ
  21. Is there a way to sequentially feed different file names through Alfred’s replace utilities and then apply them to the appropriate files at the end? By way of background, I have a workflow that I’ve been using religiously for a few years which takes a file name and then feeds it through numerous replace utilities to help me name the research-related articles on my computer in a consistent manner (mostly pdfs). As you might imagine, each individual replace utility is specific to a particular source or naming convention from my field (fixing commas, odd characters, capitalization iss
  22. Works great on my end now, too! Thanks @Andrew (and @vitor)!!
  23. @vitor FWIW - I've had this issue for quite some time, too. macOS 10.15.6 Alfred 4.1.1 (1170)
  • Create New...