-
Posts
8,980 -
Joined
-
Last visited
-
Days Won
752
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by vitor
-
-
What you can do is replace both the List Filter and Keyword Input with Script Filters.
One way is to have each be a separate Script Filter: the second one writes its own arguments to a file and displays a single option to continue, like a Keyword Input. When you action it, it delete the file. Then the first one checks for the file’s existence, and if it does exist shows something for you to continue.
A better way is to combine both into a single Script Filter, and have it interpret its own argument by using a certain character as breadcrumbs. Your Workflow can be collapsed into two objects: one Script Filter connected to one Large Type. That way, the History feature will get you your complete argument even if you dismissed Alfred’s search box. Here’s the Workflow’s code (Zsh):# If argument does NOT have a "→" in it, we are on the first step if [[ "${1}" != *'→'* ]]; then # Note how "Message" has: # "valid":false which will make it so when you ↵, the Workflow won’t continue. # "autocomplete" which will write that text into Alfred's box, making it a new argument cat <<JSON { "items": [ { "title": "Message", "subtitle": "Create a new message to show in large text.", "autocomplete": "Message → ", "valid": false }, { "title": "Message 1", "subtitle": "This shows \"Hello world!\" in large text.", "arg": "Hello world!" }, { "title": "Message 2", "subtitle": "This shows \"Goodbye!\" in large text.", "arg": "Goodbye!" } ]} JSON else # We are on the second step # Remove all text from input until the last "→ " (note the space) # This is because we only care about that part of the text # This syntax is terse but there are many other more readable ways to do it # Particularly when using other languages readonly comment="${1#*→ }" cat <<JSON { "items": [ { "title": "New Comment", "subtitle": "Enter new comment text", "arg": "${comment}" } ]} JSON fi
- brian_seidman and giovanni
- 1
- 1
-
Update.
- Replace account shorthands with account URLs.
- Force use of Zsh in terminal (relevant for people on alternative shells, like Fish).
- Add !1pdiagnostics (run that when asking for help; it auto gathers important information).
-
I understand the process you’re chasing, but what is the goal? Your question is missing important context.
macOS does not have the concept of cutting files, like Windows does. ⌘X won’t work, the correct shortcuts are ⌘C followed by ⌘⌥V. If you want to send keyboard shortcuts, Alfred has an object for that. But then how are you going to pick the correct file to copy and the correct place to paste? You seem to be entering the complicated and painful world of GUI automation, when you should instead be using the correct programmatic method: the Universal Action to move, or a simple mv command.
Until you specify exactly what you’re trying to accomplish and why you think sending keyboard shortcuts is the solution (it very likely isn’t), it is impossible to help you better. Unless we understand the problem, we can’t provide the proper solution.
-
3 hours ago, Craigers said:
I'm a little worried this could backfire and get stuck (for instance if the active app changes halfway through the process).
If it does, it will timeout in two minutes. -
This is looking strongly like an XY Problem. Please explain exactly what your goal is so we can help you with the proper solution.
-
Welcome to the forums @jun6lee. I have added your fork as the first alternative on the table.
-
6 hours ago, muyexi said:
That said, it seems the File Buffer is too complicated to be really useful.
The way I suggested works for your case, but is not how it’s typically used. -
4 hours ago, Acidham said:
But OneUpdater is implemented and should keep the WF fresh.
Not if the Workflow breaks in a way OneUpdater will never trigger because its object can’t be reached, which is the case here.
-
8 hours ago, Acidham said:
What is python3 -V telling you when you execute it in terminal ?
You can’t rely on that. The PATH is the Terminal is unlikely to be the same that Alfred uses. Note @ItsJaky has a python error, not python3. The likeliest explanation is that they’re on an old version of the Workflow.
-
-
7 hours ago, Dekime said:
The workflow worked great until a month ago.
More precisely, it worked until you updated to Monterey 12.3 or above. There is a post which explains everything, lists the solution, and (in this case and others) lists alternatives (check for them on the table).
-
Is what you’re looking for Alfred Preferences → Advanced → History (both checkboxes)?
-
@justcharlie This on is on the list but it requires a bit of extra setup. Or use the listed alternative.
-
It’s due to Apple’s changes. It’s also unfortunate one of the most popular programming languages in the world had a botched major version transition, but it is what it is. Human’s are fallible; the Python developers didn’t wish it to go this way either. The good news is this one is the most disruptive and one the remaining two (Perl) sees almost no use in Workflows.
-
Are you on build 1300?
-
@mjking No, but I’ve just made a release to add it as a Fallback Search, which gets you close (essentially requires an extra ↵).
-
Welcome @markus985,
When asking about an existing Workflow, it’s best to use its own thread. Making a new thread, while it seems like it’ll give your problem visibility, fragments the discussion and makes it less likely the author and users of the workflow (the people who can help) will see it.
I’ve moved your post into the correct thread.
To answer your question, the Workflow does both. By default it opens in the Finder, but you can ⇧↵ to open on the web instead.
-
Right, it’s exactly what @Vero said.
@Foxy I apologise for having come across as rude to you. My intent was to be clear. I see your good intentions on providing more surface level information, but I wanted to be unambiguous that to give you a definitive answer we need deeper technical information.
I have since thought of something you can try: Open File Action. But I don’t know if that’ll work. It depends on if Parallels makes macOS apps which invoke the Windows apps (I think it does or used to) and how those work in practice.
-
20 minutes ago, Quexpo said:
Nice Workflow.
Thank you.21 minutes ago, Quexpo said:Is there any possibility to add odysee.com downloads?
The Workflow uses yt-dlp, so it supports what it supports. You can request new websites on their GitHub repo. -
3 hours ago, Foxy said:
Maybe there is a way to invoke that command using an Alfred workflow?
And to do that, Parallels needs to support it. Nothing has changed from the first time I’ve pointed that out in the first reply.I don’t know why you’re resistant to getting the answer from Parallels, but until you do I cannot help you implement it.
-
But can you even open that banks folder with Windows Explorer at all?
5 hours ago, Foxy said:Do I still need to contact Parallels?
Yes. Like I said:On 4/25/2022 at 2:13 PM, vitor said:For this to work at all, they have to provide some programatic way to allow it.
I don’t use Parallels. I don’t know if they support that functionality and it’s their side which needs to. Unless there’s someone on this forum who uses Parallels and knows the answer (and sees this post), you’ll need to contact them (or search their documentation) to know. -
@evanfuchs You have both DownVid (old) and DownMedia (new) installed at the same time. Uninstall DownVid.
-
4 hours ago, xilopaint said:
As you can see I use echo to pass a newline to the next command where the binary k2pdfopt is executed. This is necessary because k2pdfopt is a CLI that waits for a newline to proceed
That is, more likely than not, a “useless use of echo”. If you want to send a newline as input, then (as already mentioned) find a way to send STDIN to your command. But first make sure there really is no way to run the tool without interactivity.
4 hours ago, xilopaint said:You’re not running multiple commands, you’re piping from one to another. Also, from that user’s specific example they shouldn’t be using the shell either. They should be running two processes sequentially, which is what the shell would do anyway.
-
Updated to add support for disabling individual accounts.
Alfred not finding Homebrew apps on M1 (/opt/homebrew)
in Closed
Posted · Edited by vitor
@dixonge What are your Workflow Environment Variable in the Workflow? And which tap did you install emacs-plus from?