Jump to content

brian_seidman

Member
  • Posts

    8
  • Joined

  • Last visited

Everything posted by brian_seidman

  1. @vitor, Suddenly having some trouble with the Shortcuts workflow; apologies in advance if this gets chalked up to user error. Possibly this is a problem with the Run Shortcuts object, but I figured you’d be able to gauge either way. Basically, I’m able to pass a string to the Shortcuts workflow via Universal Action and Run Shortcut on it, but not a file/folder. I’ve made test shortcuts that receive all types of input and then return a notification. These shortcuts will receive an string argument from Alfred and then correctly return that argument as a notification. If I pass in a file as a string (“Treat Input as String”) in the Run Shortcuts object, the notification returns that file path as a string. But, if I choose “Treat Input as File(s),” the notification is blank and shortcut steps like “Reveal File” don’t take any action, and Quick Look reports nothing was passed via Shortcut Input. I put in a couple of Debugs into your Shortcuts workflow, and it looks like the workflow is passing the right information to the Run Shortcuts object — the JSON Config object is passing an “inputmode” of 1 for files and 0 for strings, etc. That’s why I’m wondering if it’s something in the Run Shortcuts object itself; the correct data is being passed to the Run Shortcuts object, but irrespective if Run Shortcut is directly configured or configured via JSON Config, it still doesn’t seem to function on file arguments. I have tried regressing my version of the Shortcuts workflow, but that didn’t help. I don’t believe I can download an earlier version of Alfred (back to v5.06), but that would be the next thing I’d try with the newest version of the Shortcuts workflow, again to see if the newest iteration of the Run Shortcuts object in Alfred is causing the issue. I appreciate any insight you can provide. Thanks! P.S. Workaround that does seem to work is getting a file/folder via Universal Action, and then passing that argument to a Run Script object, /bin/zsh, that runs `shortcuts run SHORTCUT_NAME -i $query`, the command line version of Shortcuts. I don't think that illuminates anything necessarily, except that Shortcuts can indeed take an Alfred argument and run with it, just seemingly not through the Run Shortcuts object.
  2. This is a workflow I created and here is a Github link to the workflow. The workflow allows users to browse, launch, and perform other actions on their Coda documents by calling the Coda API through the Alfred workflow. The workflow uses the Alfy library, but this is built in to the workflow from the start. A screenshot is attached (also included in the About within the workflow and also in the Github README).
  3. vitor, thank you — that worked perfectly! I actually trigger the workflow with a hotkey, and as I was updating it, I thought I ran into a problem where the Script Filter solution wouldn't work when it was the second step behind a hotkey. But, I changed the hotkey setting from "Pass through to workflow" to "Show Alfred" and now it's working as expected. Thanks again!
  4. Thanks for your response! That's a useful feature but not quite what I'm talking about, because that only seems to save the initial query typed into Alfred and not (if I'm understanding correctly) the second or third query that might be typed as part of a workflow. Here's a link to a sample workflow — basically, a list filter with three options, two that send pre-established text to Large Type and one that further prompts you to enter new text before sending it to Large Type. It's that step I'm trying to capture — if the user is entering text as part of a second keyword box in Alfred, is there any way to capture that text if Alfred is dismissed (ESC instead of Enter)? https://drive.google.com/file/d/1E41suUeaqf1YXvD0Ez_Wvt9UhckGL7PL/view?usp=drivesdk Now that I'm typing it, I'm wondering if the first workflow included an external trigger to a second workflow, if that would return Alfred to the "first" position where the text is captured automatically ...? Update: Unless I'm doing it wrong, that solution does not work; Alfred's history retains the original keyword trigger but not anything entered after that and nothing from the workflow run via External Trigger.
  5. Is there any way to capture the text entered into Alfred if Alfred is "dismissed" rather than pressing enter, tab, etc.? That is, I have a workflow for entering something like the name of a new file, the name of a new folder, and while the optimal process is that this text gets typed in and then I press enter, sometimes the Alfred window gets dismissed by clicking away or the like. I'm imagining something like, for a specific workflow, whatever gets entered is updated to an environmental variable somehow, so that even if the Alfred window is dimissed (or when it's dismissed), the text that's entered is saved and isn't lost. I looked around and I couldn't see any way to accomplish this, and I recognize again this is kind of contrary to Alfred's core behaviors. Anyone know a way to do what I'm describing? Thanks!
  6. It sounds like you're saying that after Alfred converts an array of file paths to a string by virtue of assigning a variable, there's a way to re-convert that string back to an array that Alfred can read. Could you offer a little more detail on this? My use case: I have a "move file" workflow that's ordinarily trigged by Universal Action from a single file, saves the filename/path as a variable, runs a File Filter to get a list of folders within a certain directory, holds the selected folder as the latest input and then uses "mv" in a bash script to move the file (from the file variable) to the selected folder (from the latest query). But, this fails when I use the Universal Action on multiple files for the same reasons you mention above — if I try to save the paths of multiple files to a variable, Alfred now regards them as a single argument. So, I have to turn the script backward and make it run somewhat counterintuitively — first the File Filter asks for the destination folder (a single path, saved to a single variable), then it asks for the files to put in the folder — that way, the list of files are the latest query, and "mv" works in a for/do bash loop. If — as it sounds like you were describing — there was a way I could pass the list of files in first, save them as a variable, then choose the folder, then convert the files string variable back to a list for using in the bash loop, that would be more ideal. Here's a workflow demonstrating the issue, if that's of interest to anyone else: https://drive.google.com/file/d/10WyyjVGDJTd4P79d8P4ikbTw1sPkeLwX/view?usp=drivesdk Thanks!
  7. With the 2022.1 version of the Alfred Shortcuts workflow, I'm having an issue where if the Shortcut has some sort of output (text) that it would copy to the clipboard ("Copy to Clipboard" step in Shortcuts), that output does not seem to copy to the clipboard. It works just fine in the 2021.1 version. In debugging, the 2022.1 Alfred Shortcuts workflow does run a Run Script step to Copy to Clipboard that does seem to have the correct output within it, but for some reason I'm not able to paste that output — Cmd + V doesn't work, and neither does the output show up in my clipboard history in Alfred. The final Copy to Clipboard step in the 2022.1 Alfred Shortcuts workflow is not marked as transient; I do see that the "middle" Copy to Clipboard steps are marked as transient, but toggling that only copied the name of the shortcut to the clipboard, not the text output. Seems like something that changed between the 2021.1 version and the 2022.1 version is causing the issue. Overall the workflow is great and thanks so much for releasing it! 🎉
  8. Here's one more by Stephen Millard that uses Shortcuts' command line utility to list and trigger shortcuts: https://www.thoughtasylum.com/2021/11/12/alfred-workflow-bypass-for-shortcuts/
×
×
  • Create New...