Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Jasondm007 last won the day on July 9

Jasondm007 had the most liked content!

About Jasondm007

Recent Profile Visitors

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

  1. @dfay, @vitor & @deanishe - Thanks for taking the time out to help a coding neophyte, like myself. I really appreciate it. Honestly, I can't thank you guys enough. Alfred's great, but it wouldn't be the first thing I'd install on a Mac, if it weren't for you guys and others on the forum. I've learned a ton from you guys! For others who may be struggling with script filters and JSON outputs, I've uploaded a new version of the workflow to use as a learning example: Download Workflow. The workflow combines everyone's suggestions from above: AppleScript, JavaScript & Ruby. All three are nearly identical, with the exception that the JavaScript and Ruby versions lack the prefix "Same Words" in the subtitle. This should be enough to get you started, if you're also struggling to get your head around how script filters' outputs work.
  2. @vitor Thanks a ton for the explanation and the two working examples. This was extremely helpful, and it got me thinking that I could probably figure out a way to use my existing AppleScript to generate the list and then feed it into your JavaScript or Ruby script filter examples? It's a pretty complicated AppleScript - for my scripting ability, anyways - that generates the list. To be sure, I don't disagree with any of your statements - or others' on this forum - about AppleScript's 💩 status. But it would take me ages to learn one of these better languages, and then reverse engineer the existing AppleScript. As you can tell, I hardly understand AppleScript 😉 @dfay Thanks for the sources above! One of the first failed variations that I mentioned above came from my hackneyed attempts at pulling out pieces of your windows workflow (the one that works for Preview and a few others apps). When @deanishe mentioned a json.scpt file, I knew that I had seen one in your workflow, so I used it in several iterations. But I could never get any of them to work. However, I completely forgot about your more streamlined workflows for only Preview and Finder. In the multi-app version, I think stringing all those variables together for the different apps got me a little turned around. In any case, I'll go back and take a look at those other versions. Thanks a ton!! I can't thank you both enough!!
  3. Or, relatedly, does anyone know of another workflow they could point me to that uses a script filter in a similar fashion (i.e., another good learning example)? Thanks again!
  4. I have a very basic question about how script filters work that I haven’t been able to find a direct answer to on this forum or on Alfred’s support page. To be fair, there’s a ton of fantastic information on both, but I simply haven’t found one dumbs its explanation down enough for me to follow it. I've been using Alfred for quite some time, but have never been able to understand much about script filters. In short, I was wondering how to get items from an AppleScript list to show up as JSON formatted items in a script filter’s output (so that I can select one of them, and have it operate like the argument in a subsequent object)? For simplicity, let’s say I have an AppleScript that generates the following list: {"Red", "Green", "Blue”} But, in practice, that list will be dynamically produced and longer. In other words, I can't get away with just manually listing each item in the script filter (like in Alfred's jsonformat workflow example: Getting Started/Script Filter). Based on this example, how do I get the script filter’s output to operate like the following? Item 1 Title: Red SubTitle: Same Words Red Argument: Red Item 2 Title: Green SubTitle: Same Words Green Argument: Green Item 3 Title: Blue SubTitle: Same Words Blue Argument: Blue To illustrate, here’s what the output might look like when created with a list filter: *** @deanishe, I tried following your helpful advice and added a json.scpt file from another workflow that also used this approach. However, I couldn’t quite figure it out. Is there any way that I could talk you - or anyone else - into walking me through this, using the following example? 🙏 Based on the example above, I’ve created a very basic workflow to help illustrate things (for myself and others): Download Workflow. The workflow contains: (1) a script filter and (2) a list filter. The script filter has been stripped down to a single line of code that sets a variable to the afore mentioned list above (set theList to {"Red", "Green", "Blue"}) (AppleScript). In other words, I removed all of my failed attempts, and have only included this line in the AppleScript as a starting point (I understand there’s more to be done here). As for the list filter, it was included to illustrate how I’d like the script filter to perform (i.e., its output). I understand that if the string/list was fixed, that I could always just use it (instead of a script filter). Again, this was added strictly for illustrative purposes. To keep things simple, both filters simply copy their output to the clipboard. So, if you select the “Green” item from Alfred’s output, it would copy the word “Green” to the clipboard. In practice, this would be connected to another object that would do something else with the variable. But this struck me as an easiest way to test things. Can someone help walk me through how to set up the script filter so that it operates like the list filter (using an applescript list of variables)? Thanks in advance for any help you can lend! I really appreciate it.
  5. @sballin The update works like a charm on my machine, too. You're the best! Thanks a ton!!
  6. @sballin Yeah, on my system, it's only located in: /System/Applications
  7. @sballin I'm not sure if this is what you're asking, but when I run your workflow and it shows the search results, I see the workflow's icon next to each note (i.e., not the default Notes.app icon or anything else). Hope this helps!
  8. @sballin I'm not sure if it's helpful, but here's the path to the Notes app: /System/Applications/Notes.app
  9. @sballin Thanks for your help! Omitting the initial lines from the debug log, here's where the error occurs: ... ... [14:35:44.266] Notes - Search [Script Filter] Processing complete [14:35:44.282] Notes - Search [Script Filter] Passing output 'x-coredata://BC2A1C56-125D-4468-A9F8-D42448AC3262/ICNote/p3639' to Run NSAppleScript [14:35:44.439] ERROR: Notes - Search [Run NSAppleScript] { NSAppleScriptErrorAppName = Notes; NSAppleScriptErrorBriefMessage = "AppleEvent handler failed."; NSAppleScriptErrorMessage = "Notes got an error: AppleEvent handler failed."; NSAppleScriptErrorNumber = "-10000"; NSAppleScriptErrorRange = "NSRange: {67, 20}"; } Thanks again!
  10. @sballin Since updating to Catalina last evening, I'm still able to search for everything using your fantastic workflow. However, when I select the note that I want to open from Alfred, the workflow won't open it. The workflow looks like it's working as usual, but nothing happens. I noticed that there is a "Note Opener" app in the workflow. Is this the usual "unidentified developer" problem with Catalina? Unlike other workflows that had this issue, I did not receive the usual error indicating that it was trying to run an app from an identified developer. Any ideas what might be causing the problem? Others above seem to be OK since updating to Catalina (or at least one of the betas). Your workflow is one of my favorites on Alfred!! Thanks for your help!
  11. In Alfred's "File Search" preferences panel, it'd be helpful if the butler added a "Don't Show" option for Videos. He's already got an option for "music", how about videos, too? And, if that's not a possibility, how about a general exclusions panel where users can drop in anything that they might want to exclude, such as MP4s, Excel files, etc. Thanks for your consideration!
  12. My apologies @Andrew, I should have been a little more clear. I was asking whether the fantastic new * method for finding matches across multiple fields - as you've shown in the screenshot above, with the metadata field set to * - is limited to searching the nine default fields provided in the file filter or whether Alfred's actually searching all metadata fields on our system (e.g., kMDItemTextContent, kMDItemFSName, and all else)? Thanks again!
  13. @Andrew Thanks for making this update! It's super helpful!! Quick Question: Is it searching all available metadata fields or just the usual nine fields listed in Alfred's dropdown? Thanks! As for the improvements you alluded to above, is there any way this will include the ability to limit/specify the metadata fields? 😀🤞 Alfred rocks! Thanks again, @Andrew!
  14. @deanishe Agreed - it's just a problem in Alfred's preferences, as described above. And, to be clear, it's a relatively minor UX problem in the scheme of things. For the most part, I really like Alfred 4's new look. While the point about dark themes and usability across light and dark themes is fair, it's odd to rule out the use of dark iconography now in Alfred's preferences. Ignoring Alfred's longstanding use of gray/light backgrounds and black typography, there are a lot of people with vision-related issues that depend on white/gray/light backgrounds and dark text/icons for legibility purposes. Not to mention the fact that Alfred's own icon is hardly visible in the settings described above. Take a look at the screenshots below. Why create visibility constraints that even the app's own icon doesn't work well under?
  • Create New...