Jump to content

vitor

Staff
  • Posts

    8,469
  • Joined

  • Last visited

  • Days Won

    706

Everything posted by vitor

  1. Are you sure ⌘K is the right shortcut and that doing it manually results in the desired behaviour? I don’t use ClickUp so I can’t go through all steps but everything looks to be working. Do note that the second Copy to Clipboard needs to have {clipboard}, not {query}, because otherwise you’re copying the passed website address.
  2. The way you’ve organised your screenshot is interesting and clear. But for future reports, it’s best if you upload the Workflow somewhere and provide a link. That’s less work for you and is more helpful to anyone helping. Doing both is even better, but if you can only do one pick sharing the Workflow because that allows us to try it in context. On with the problem. You’re conflating Alfred features with AppleScript code. {query} doesn’t come into play here because you’re (correctly) using with input as argv. The though process is reversed: that code is to store the clipboard contents into a variable, not make the given argument become the clipboard contents. Long story short, get rid of that line as it’s not doing anything. Another likely problem is that despite you having a large delay at the top, you don’t have any between the two keyboard shortcuts. That’s part of the perils of GUI automation, you always need to ensure everything has waited enough time. Try: tell application "System Events" delay 10 keystroke "k" using {command down} delay 5 keystroke "v" using {command down} end tell And adjust the second delay accordingly. Or better yet, use Alfred’s native objects: Delay Utility (wait) → Dispatch Key Combo Output (press shortcut) → Delay Utility (wait again) → Copy to Clipboard Output (paste)
  3. Font colour is determined by your theme; Workflows don’t have control over that.
  4. Welcome @timrosenberg, Processes which allow you to make calculations on time typically require that you be specific with the date. That is to say you wouldn’t do 9:00 + 4h but March 10 2022 at 9:00 + 4h (consider what happens when it goes over to the next day; it has to be represented). If you only want to add hours, you’re looking at simple arithmetic: (9 + 4) % 24. The % is the modulo operator. Doing it on 24 will make it “flip over” according to a 24h clock (example: (17 + 9) % 24 = 2 or “5PM plus 9 hours equals 2AM”). You can try these in Alfred’s main window by starting with = then typing the operation. If you want to use this in a Workflow, you’ll have to be more specific in your request. Right now it’s so broad it approximates an XY problem so there’s yet no way to know what the best answer is.
  5. What exactly are you trying to discern? Different developers build Workflows in different ways, with different languages, and give weight to different features. You should use whichever you like the most and fits your mental model better. Do note this one is in maintenance mode. @Acidham’s is still being updated.
  6. Welcome @Pchecoandres, No, that is unrelated. From the moment you start the Script Filter, it becomes the Workflow’s responsibility to show results. How? If you don’t specify what you’ve done, it’s not possible to know what went wrong. Use the debugger to see what’s happening. At the very least, you’ll probably need to install PHP. Note this Workflow was last updated a decade ago. It may still work fine or it may not work at all because in the meantime Parallels may have changed their system significantly. @flakshack’s top post has other tips on how to remake this with some manual work (namely a File Filter, but you could also try a List Filter). Alternatively, there may be another Workflow which does this.
  7. I haven’t tried it but your assumptions seem correct. Do note that since the synced preferences are a directory, Dropbox should only sync what changes inside. That is to say in your unlikely scenario where you make changes on both accounts without internet connection, you’d have to make changes to the same path for there to be a problem. Even if that did happen, Dropbox should offer you conflict resolution (“which file do you want to keep”), though that is best avoided. Consider making regular backups of your Alfred preferences, at least until you feel confident in your system. Alternatively, you may want to try /Users/Shared as a location for your preferences. That way you guarantee they are synced between accounts and don’t have to worry about connectivity.
  8. I doubt Maciel would just abandon it. It makes money and one of his frequent quips is how every other bookmarking service falls by the wayside. If he got tired of it, maybe he’d go into maintenance mode and get someone to manage it. I think he did something similar when he went to Antarctica. That might still be worth it. He’s usually responsive and interested in knowing about errors. Worth pointing out the blog is down as well.
  9. Are you pasting the code into the Script box? You’re trying to use Zsh to run Swift code. Set the language to External Script instead and put the code in the file. Increasing the 1 in the line below to however many days you want to check in advance might work. But it might not: I have neither dealt with the Calendar API nor have I thoroughly checked the rest of the script to see if there’s something else which would make it not work well for multiple days.
  10. It is the correct way to make it work. The alternative would be to do the filtering yourself, which in this case is not necessary and would be slower.
  11. This may be what you want: const music = Application("Music"); const playlistItems = music.playlists.name().map(playlist => { return { "uid": playlist, "title": playlist, "arg": playlist } }) JSON.stringify({ "items": playlistItems })
  12. No, this one is fine. “One problem at a time” is what matters. What exactly is the new question? What’s your current setup and what result are you trying to achieve?
  13. If you don’t like it, you can turn it off. Alfred Preferences → Features → Default Results → Fallbacks. That’s an entirely unrelated problem. If you want to use a Script Filter, don’t use AppleScript because you’ll need JSON. Use JXA instead. Run the command in the Script Editor app. Script Filter JSON Format. But again, that has nothing to do with the original question. If you start with a simple query and then introduce an unrelated complex one midway through, it won’t be easy to help you.
  14. I like date and time for this because the uniqueness is guaranteed over multiple sessions and reboots. With a random number or process ID, there’s a minute (but not zero) chance of a collision down the line.
  15. This Workflow is deprecated. If you want an alternative to download video and audio, see DownMedia, which I continue to maintain. You’ll have to brew install yt-dlp.
  16. Glad you solved it, but that is interesting. Could you provide more information? Which files or folders had the wrong permissions, and what were they? Do you have an idea of what caused the permissions to change before?
  17. What is the purpose of the Keyword? You can start the Workflow with the List Filter itself and the behaviour would be the same. Better, even, because it would ensure you only type valid options and wouldn’t need to use the full word.
  18. You tell Alfred to use Language /bin/bash or /bin/zsh in the script editor and add export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}" as the first line, like you have in the screenshots. Under that, put the path to your script. If the script is in the Workflow directory, use ./myscript.mjs. . represents the current directory (.. is the parent), so ./myscript.mjs means “the myscript.mjs file in the current directory”.
  19. Then install it. That’s part of the instructions: You cannot invoke a tool if you don’t have it.
  20. Are you sure you have installed jq? What does which jq return in a terminal?
  21. You don’t need it. I phrased it so you can just make the text changes I pointed out. But I’ll say it another way. In all three Script Filters: Replace the line #!/usr/bin/env bash with export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}". Replace the line JSON_STRING=$(/usr/local/opt/jq/bin/jq -n \ with JSON_STRING=$(jq -n \. This is untested, but considering your error above, should fix it.
  22. It is, but it installs to a different location and this Workflow hardcodes the Intel path. If you brew install jq then do the steps I wrote for @gingerbeardman above, it should work for you.
  23. I beg to differ! You correctly identified the problem and the solution, so you can do it. Someone else also found it and submitted a fix, but it was never included. Here’s what you have to do: In Alfred, right-click the Workflow → Open in Finder. Open the getfile.sh file in TextEdit. Make these changes. You’ll remove a / on line 6 and add one on line 11, do you see it? Save the file. You should now have a working Workflow, assuming that’s the only issue.
  24. @davidrd85 If you are on an Intel Mac, have Homebrew, and run brew install jq in a terminal, the Workflow should start working. @gingerbeardman To make this work out-of-the-box for more people, you only need two changes (in all Script Filters): Add export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}" at the top. Change /usr/local/opt/jq/bin/jq to jq. Also, you can remove the #!/usr/bin/env bash shebang because it’s not doing anything; you’re already telling Alfred to run them via /bin/bash.
×
×
  • Create New...