Jump to content

vitor

Staff
  • Posts

    8,471
  • Joined

  • Last visited

  • Days Won

    706

Everything posted by vitor

  1. Why not use an Arg and Vars Utility to send that as a query? That’s what the ChatGPT / DALL-E workflow does. Extending the JSON doesn’t really seem like it’d solve what you want, from the description. What’s the use case for populating the input field instead of directly doing the thing?
  2. @naukc You need to install the Automation Tasks. @3point ChatGPT (and any other LLM) doesn’t “know” anything, it strings text together. Check OpenAI’s own models page; GPT-4’s cut-off date is April 2023 while GPT-3’s cut-off date is September 2021. So the answer you were given is contradictory, it can’t both have a cut-off date of April 2023 and be GPT-3. In other words, you are using GPT-4. Asking it what model it is is particularly unreliable, I’ve been reproducing that wrong answer for quite a while.
  3. You don’t need a separate script to run the trigger. And use the AppleScript instead of the URL: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.jct.runalfredchrono.plist</string> <key>LimitLoadToSessionType</key> <string>Aqua</string> <key>ProgramArguments</key> <array> <string>/usr/bin/osascript</string> <string>-e</string> <string>tell application id &quot;com.runningwithcrayons.Alfred&quot; to run trigger &quot;run&quot; in workflow &quot;jct.chrono&quot;</string> </array> <key>StartInterval</key> <integer>60</integer> <key>KeepAlive</key> <true/> <key>RunAtLoad</key> <true/> <key>StandardErrorPath</key> <string>/dev/null</string> <key>StandardOutPath</key> <string>/dev/null</string> </dict> </plist>
  4. If you notice, Alfred’s file search returns results as you type and is smart about what to show and how many results. What you’re asking for, returning every file on the system with previews, would be resource intensive and would take a while to get everything showing. Performance is important. To have an idea of how long it takes just to list every file on just your home directory try this in a Terminal: /usr/bin/find ~ You can abort the command at any time by pressing ⌃C or closing the window.
  5. Could you share the workflow? So we can properly look at the config and replicate live to see what’s happening?
  6. You don’t have to remove the extension, but you do have to add the shebang. That’s not a workaround, but rather exactly the correct procedure in any Unix operation system (including macOS). This works exactly the same in the Script Filter if you use External Script as the mode of execution. There is a difference between opening a file and executing it. The extension is irrelevant in the latter. For example, you could name your file my_script.rb (i.e. have a Ruby extension), but because you have the python shebang it will still execute correctly. This is normal and expected. Consider, for example, if you installed multiple interpreters for the same language (e.g. one for Python 2 and another for Python 3), and you have scripts in both languages (which, as you probably know are likely incompatible since Python broke backwards compatibility of a lot of things in the transition). How would the system know if a .py is for version 2 or 3? And how would it distinguish between opening for editing or for executing? The answer is the shebang, it’s what informs the system where to pipe that text file (the script) to the correct executable. Conversely, let’s say that in a Script Filter you set your language to Bash or Zsh and then in the code have something like /usr/bin/python3 my_script.py. Again the extension is irrelevant, but in this case so is the shebang because you’re already telling the script how exactly you want the file to be executed. Or rather, you told the python interpreter to execute the file. In this case, you could even have a my_script.rb with the shebang #!/usr/bin/ruby, but because you said /usr/bin/python3 my_script.rb, then it will be executed by Python. In other words, using the shebang or the interpreter are different ways of accomplishing the same thing. The shebang is an integral part of the execution model. So to reiterate, your file can still be my_script.py but it does require the shebang.
  7. Welcome @csjaugustus, Yes, you can use literally any language, just like the Script Filter. All your stated assumptions are correct, but note the message (emphasis added): The external script may not exist, or doesn't have execute (+x) permissions. What you have to do is locate your script inside the workflow’s folder and (with a terminal) do chmod +x /PATH/TO/SCRIPT/HERE, which will make it executable. When you create the script directly from Alfred by setting the Text View source to Script, typing a name, and pressing Create, that is automatically done for you.
  8. You can set the mods in the Script Filter’s JSON, with custom text. You can go further: have mods in your Script Filter set the subtitle text and a variable whose name is consistent for each modifier but the value is specific. Then, from your Script Filter you’ll only have one connection out to a conditional which checks the variable’s value and branches accordingly. I use this technique in a few workflows, e.g Pin Plus.
  9. For sure! If you haven’t yet, I recommend you check the Getting Started Guide for an interactive tutorial on making workflows. @Stephen_C is also creating a series on Simple Ideas and @Vero is making videos on workflows and features. There are also workflows in the Gallery which are good examples of ideas you can make even without code. Finally, the documentation is quite comprehensive. You can click the (?) in any object to go directly to it. And we’re here for any questions. Have a great weekend!
  10. Welcome @PBerg, Note that the folders indicated by the variables @Stephen_C mentioned still have to be created. In your case, the easiest way would be to use the Write Text File Output with Create any intermediate folders turned on. Then use the File Contents Automation Task to read the file back. It’s not, that’s how you’re supposed to do it. If you want to save data for later, you have to save it somewhere. The reason you should use one of the folders @Stephen_C mentioned instead of the workflow’s own folder is that by using the latter you’re kind of changing the workflow itself. Which mostly doesn’t matter unless: You’re sharing the workflow with someone else. You wouldn’t want your personal text to be packaged with the workflow.The file you’re saving is large, which increases the size of the workflow and could take up more space in syncing.
  11. I know for sure Twitter used to work. But right now it’s so locked down that I wouldn’t be surprised if this is one of the consequences. Can’t really speak as to the others. Your best bet is to search their issue tracker, or ask for an addition (e.g. Loom).
  12. Welcome @Crystal Taggart, This succinct post should get you started. You may need a plugin for the Stream Deck, and then create a short workflow in Alfred where you’ll use the External Trigger connected to a Copy to Clipboard Output (tick the Automatically paste to front most app checkbox) to paste your text.
  13. From your description (thank you for being thorough with the details!) the first thing that comes to mind is that you may have a workflow installed which also uses the mail keyword, and are seeing results from that. You can open Alfred and type ?keyword mail to verify.
  14. Updated to 2024.6. Add chat history feature.Add option to archive images.Add Fallback Search.Add option to start new chat to Universal Action and Fallback Search.Do not close window on relevant steps.Support Organisation ID.Add model override for ChatGPT.
  15. I don’t pick what’s supported, yt-dlp, used by the workflow, does. Whenever you have an issue with a download, the solution is to try to download it from the Terminal with yt-dlp and report the result on their issue tracker. Downloading anything which requires credentials is out of scope, though.
  16. To add to Stephen’s answer, look also at Run Scripts, which are a way to do it without opening a Terminal. And Script Filters which can run code and output results in Alfred itself, as can the Grid View and Text View. In other words, yes, Alfred can do it in a myriad of ways. See the Getting Started Guide for an interactive tutorial on making a workflow and check the comprehensive documentation to learn even more.
  17. Don't worry about it, I’ve only been seeing positive reception! Keep ’em coming! That is so so much the right attitude. Thumbs up. Any of your workflows which is done without code seems like a perfect candidate for a deconstruction. And here’re a neat trick. A URL for all of your Simple Ideas posts: https://www.alfredforum.com/search/?&q="Simple ideas%3A"&author=Stephen_C&search_and_or=and&search_in=titles&sortby=relevancy
  18. Funnily enough, I don’t know. Your report was the first one I ever got for this issue. But what I have locally already has a ton of changes from the current release version, so trying to reproduce your issue would be extra hard since it’s effectively a different workflow. So I finished up the changes I was making today, cleaned it up a bit and gave you an early version, thinking that whatever it was might’ve been addresses already. Apparently it was! Deleting the directories was to be extra sure there wasn’t some other interim thing causing the problem (that’s still a possibility). So whatever you were facing ends up no longer mattering, since the new release will be closer to what you have now.
  19. Use a shebang in your script and make it executable. That box is essentially the same as the External Script option in Run Scripts and Script Filters.
  20. Please try this: Delete the workflow. Delete ~/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai Delete ~/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai Install this version. Let me know how you get on. If it still fails, I’ll need the new debugger output and the chat.json file (not the contents, but the actual file).
  21. Could you provide a short video with the debugger open? In it, please also make sure to start a new conversation with ⌘↩ so I can see it happen with a clean slate and better see the timings with the actions, to see if I gather the cause.
  22. Welcome @depatl, I’m going to need a bit more information, crucially the debugger output.
  23. Thank you. That is correct. Make a new workflow with a Keyword Input and connect it to an Arg and Vars Utility with your custom text plus {query} for the new input from the Keyword. Then connected it to a Call External Trigger Output set to open continue_chat from this workflow.
  24. Alfred’s defined PATH is /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin. Pyenv is irrelevant unless you’ve symlinked to one of those locations or the workflow uses it. What’s more likely to be causing the issue is you having Python installed via Homebrew and that Python 3.12 has (again) breaking changes. And yes, using /usr/bin/python3 is indeed the best way to go about it, to ensure as much consistency as you can.
×
×
  • Create New...