Jump to content


Community Hero
  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by vitor

  1. I’d find it hard to believe that any Pinboard Workflow wouldn’t use a cache. Not doing so would be a fast way to be blocked from the service.
  2. In Ruby, you’d do this: require 'json' require 'pathname' script_filter_items = [] Pathname.new(ENV['HOME']) .join('Notes') .children .select(&:directory?) .each { |path| script_filter_items.push(title: path.basename, arg: path) } puts({ items: script_filter_items }.to_json) You can use that code as-is in a Script Filter (with Language set to /usr/bin/ruby) between your other steps in Alfred.
  3. The fact that you’re using AppleScript makes the task significantly harder. AppleScript is an awful language: it’s too different from other languages, lacks several features, and is badly documented. That in turn makes it that few people want to use it, meaning there’s less people to help you and less people making resources for you to learn from. AppleScript falls flat on its goal of being a language for people who don’t know how to program. It’s sole redeeming quality is that it can talk to GUI apps in a programatic way built into the system. But I advise you to use it for that alone, and get out and use something else as soon as possible. If you want to learn to program, do not start with AppleScript. It’s weighing you down. At the very least, as @deanishe mentioned in the thread you linked to, use JXA (JavaScript for Automation), which gives you the only good part of AppleScript in a better (yet still not good) language. AppleScript doesn’t understand JSON, you have to build it by hand and that’s not a good situation to be in. You want to use a language that can build the JSON for you from a simple list you give it. JavaScript (works with Alfred’s /usr/bin/osascript (JS)): const my_list = ['Red', 'Green', 'Blue'] // Your example list let script_filter_items = [] // We will build this array with the elements for the Script Filter my_list.forEach(element => { // For each item in your list script_filter_items.push({ 'title': element, 'subtitle': element, 'arg': element }) // Add them to the empty array }); JSON.stringify({ 'items': script_filter_items }) // Transform it into JSON Alfred understands Ruby require 'json' # We need the JSON gem, to be able to use JSON functions my_list = ['Red', 'Green', 'Blue'] # Your example list script_filter_items = [] # We will build this array with the elements for the Script Filter my_list.each do |element| # For each item in your list script_filter_items.push(title: element, subtitle: element, arg: element) # Add them to the empty array end puts({ items: script_filter_items }.to_json) # Transform it into JSON Alfred understands
  4. You may also connect a Hotkey Trigger (with Action set to Pass through to Workflow and Argument to Selection in macOS) to an Open File Action (leave the left side blank).
  5. We’re back to square one, then. Unless we get someone else with the issue, we’ll have to assume the problem is on your side.
  6. You’re in the Workflow Data directory for the shared resources. I mean the Workflow’s directory, as in right-click the Workflow in Alfred and pick Open in Terminal. Likely a remnant of how the script that deals with it used to work. You can delete it.
  7. Correct. I doubt this is the issue but let’s check anyway, one step at a time: open the Workflow’s directory in a Terminal and run ./Notificator.app/Contents/Resources/Scripts/notificator --message 'testing'. What’s the result?
  8. What are your versions of: macOS. ffmpeg. If ffmpeg -version doesn’t work, try ~/Library/Application\ Support/Alfred/Workflow\ Data/com.vitorgalvao.alfred._sharedresources/bin/ffmpeg -version. Alfred. DownVid.
  9. Welcome @aosaigh, Do you want step 2 to show a predefined set of directories (fixed), or all directories inside of ~/Notes (dynamic, changes depending on what exists)? Both are doable, but the former is simpler and doesn’t require programming. We can help you with either.
  10. That’s not an error, it’s regular Alfred information on what the Script Filter is showing. You’ll see that in your example of running youtube-dl, similar information is given. Unfortunately, I’ve not been able to reproduce your error.
  11. Doesn’t @deanishe’s Searchio! do the same (and more) as this Workflow?
  12. What’s your macOS version? Have you considered doing a clean install of the system?
  13. Depends on why you want to get the list. If all you want to do is see all your Hotkeys in Alfred (e.g. in a Script Filter), all you need is to type ?hotkey.
  14. Welcome @ignaziolaci, Connect a Keyword Input to a Run Script Action, make killall Dock the Script text in the latter, and you’re done. But why do you have to kill the Dock so often? There may be a better solution to your problem.
  15. Thank you. And welcome to the forums. Yes, it’s because I’ve made a small update and any change to a Workflow makes it incompatible with older Alfred versions. I make and release these for free, so I don’t have the bandwidth to keep separate versions around. Download this version and remove the pink OneUpdater node. You’ll no longer receive updates.
  16. And for that reason you should ask somewhere else with more eyeballs, like Ask Different. Like dozens of other bugs and complaints. Catalina is buggy. It was a hasty release and is frankly an embarrassment. There’s a good chance someone has bumped into that issue before you, and you have a better chance of finding them in a bigger generic community. Alfred’s community is great but specialised, and your problem falls outside the scope.
  17. It should work the same, with the exception that with github_release you don’t need the Workflow’s name to not change. Yes, that’s correct. As a long-time maintainer of Homebrew Cask, I’ll say that trying to figure out every versioning method from everyone to understand when a release is higher or lower is a waste of time and resources. For an auto-updater you want the latest version, and that’s the one on the source. Another case where the simplistic comparison is useful. If an author forgets to change the version, the only thing that will happen is that users won’t get the update (same as other updaters). Like what? Thank you! Those are its design goals, so happy to see it succeeds. Thank you again. Some libraries, like @deanishe’s Alfred-Workflow (for python), have builtin-updaters, so if you’re using the library for everything else, it makes sense to use its updater.
  18. Welcome @ntrpy, There isn’t, no, though you could probably hack it together (I don’t recommend it, as it’s GUI scripting) with a Workflow connecting a few Hotkey Triggers to Dispatch Key Combo Outputs (press ↓ a few times followed by ↵).
  19. Culinary units are used outside of the USA, and have precise metric measurements. @biati How are you handling auto-updates? Does the Workflow support them? If not, I can help you set it up with OneUpdater (disclaimer: I’m the author). I found some references to Packal inside the Workflow. Did you upload this to Packal, download it again, and made updates on that version? Either way, using Packal is no longer recommended, as the website is abandoned and buggy. The official place to share Workflows is the forums.
  20. You’ll have to be more explicit. You haven’t said how it’s working, what you expected, or why the former and the latter aren’t in alignment. I can’t help you if I don’t know what’s wrong.
  21. Update. Added OneUpdater (just noticed I forgot on the initial release).
  22. You can. There’s a purple “Edit” at the bottom.
  23. Welcome @stevemoser, Hotkey Triggers have a Related Apps tab. You can drag Alfred there and make it so your Hotkey will only trigger when Alfred has focus. The rest of the Workflow might not be obvious, as you’ll need to grab Alfred’s text and use that as the query. Here’s a ready-made Workflow.
  24. That’s the default. Have that option work with a modifier key that sets a variable, and have a connection to a Call External Trigger Output that will only progress if said variable is set. That’s the only behaviour. Your wording makes it sound that can be changed, but it can’t. You seem to be inquiring about something really specific but you’re not telling us why. To avoid and XY problem in which we’ll be running around trying to accommodate an inadequate solution, you’d be better off being explicit about what you want your Workflow to do.
  • Create New...