Jump to content

GuiB

Member
  • Posts

    366
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by GuiB

  1. 4 minutes ago, Kamil said:

    I am having trouble using this workflow. chc does not work, and for all other functions I get this popup:

    (I could not find a git repo for this workflow)

     

     

    Any help? I'd love to get this workflow to work..

    Screenshot 2023-01-15 at 15.52.08.png

    Yes I need to update the Workflow to use Python3 instead of 2. I did install Python 2 on my computer to make multiple of my workflows work again since I moved my OS version, but yes I need to do an update to this one and share it so anyone can keep using it 

     

    I'll have a look as soon as possible. My days are very busy since many months, but I should manage to do it soon!

     

    As for the "chc" keyword, can you give me more input on your problem with this one? Do you have any error message? This is using standard Alfred objects and scanning the standard address book directory "~/Library/Application Support/AddressBook". I would think this should still work and I'm not having a problem with it on my side. I'll think some more and try to determine what it could be!

  2. 8 minutes ago, ajyey said:

    Is there any work being done to make pre-built workflows more accessible throughout the community? I've found myself having to scour this forum and github for existing workflows. Having a dedicated official website or in-app solution for this would be great. That said, amazing work on improving an already great piece of software !

    A new Workflow Gallery website is in the work and will be released after v5, as mentioned by @Vero in this post:

     

     

     

  3. Hey @Andrew and @Vero ! Congrats on the new version! This looks great and I’m loving the attention to details!

     

    "Automation Tasks" looks to be a good idea to make Workflows work without breaking on system upgrade by keeping the actions maintained with Alfred. I’m looking forward to how this develops and also to the release of the task development tool!

     

    Again, congrats and all the best! :)

  4. I like to use the "Quick File Search mode" to rapidly get to a file by its name and most often I get what I want especially if it's a file that has been used recently. To access this mode, make sure to have it active in your Alfred Preferences at `Features -> File Search -> Quick Search [x]`. You have access to it from a standard Alfred search but by prefixing your search term with ' character or typing the spacebar.

  5. 7 minutes ago, deanishe said:

    set the clipboard to (filePath as POSIX file) works for me

    Hmm, you're right, I think I see why I had trouble... I've been testing with TextEdit and set it to Rich Text, but when I run the script it doesn't work, but it works when we drag and drop the file into the text field and then it asks if we want to switch to RTFD and then it works. I may have done those kind of manipulations before seeing that it worked with that strange script of converting from one to another POSIX file/path...

     

    So, to put it there, this should work on a RTFD document:

     

    set filePath to "/path/to/an/image.jpg"
    set the clipboard to (filePath as POSIX file)

     

    And here is a workflow as example: https://d.pr/f/JneYcR

  6. 42 minutes ago, deanishe said:

    That script looks suspicious. Why are you converting a POSIX file to an alias to a POSIX path, then back to a POSIX file?

    Yes, I know it has always been strange to me as well, but this is the only way I found out at that time to make it work with simple AppleScript commands. I'll see if I can find a simpler way, but at the moment this should work.

     

    Pasting a simple `POSIX file (filePath)` doesn't work, at least, not on my tests...

  7. This look like my script and I've tested again and it seems to work on my side. Do you have connected the "Run Script" to a "Dispatch Key Combo" set to CMD+V to do the paste action ? Another point, are you testing your workflow in a text field that accepts rich text so the image can be pasted into it ?

     

    It's better if you send the complete workflow instead of a screenshot of a single element if you want anyone to test it completely and try to find the bug.

  8. 2 minutes ago, deanishe said:

    You can make a File Action available for such files by adding +public.zip-archive (note the plus sign) to the Types list.

    You're right, I should have added the "+" character! However, since the ".spa" file isn't a standard zip file and @Chris Messina didn't have a default app to open this file, I don't think a filetype would be defined correctly and set to be a subtype of "public.zip-archive"

  9. 2 minutes ago, Chris Messina said:

    Cool, this worked, thanks. Appreciate the workflow as well.

     

    I forgot to add, make sure to press the "Modify all..." button just under so all the files with this extension will be set to open with the The Unarchiver on your system.

     

    4 minutes ago, Chris Messina said:

    Again, I was using my specific situation here to illustrate a broader point about which Universal Actions are included by default, as well as pointing out the lack of integration with macOS Services, Extensions, and Share To destinations — but you addressed my core issue in the meantime!

    Yes, I understand and I think it would be great as well to add all those things to the Universal Actions. @Andrew said that he have many plans to improve the Universal Actions feature, so those may be part of them...

     

    Or in the meantime, users could create workflows to add those features. Beside, here is my version of the Zip action: https://d.pr/f/xamxKe

     

    It's using the Finder Compress feature and using Automator to get a cog icon in the menubar so we know it is compressing the file.

  10. 9 minutes ago, Chris Messina said:

    Since there is no default opener for .spa files, I can't just use the "Open" action. 

    Then maybe you should set a default application to use for those kind of files. (Get Info -> Open With -> The Unarchiver)

     

    Or you can use the "Open with" Universal Action to specify with which application you want the file to be opened. Or you can define a File Action that would work with Zip files and ".spa" files and that would be set to open the file directly in the specified application. Here is an example with the The Unarchiver: https://d.pr/f/nT46SC

     

    You may need to add one of your ".spa" file into the File Action type that it will show for. I dropped a file with a ".spa" extension on my side, but since I don't have any application that work with this kind of file, I'm not sure if the metadata are set correctly...

     

    Beside, even if Alfred have a built-in unzip action, then there's good chances you won't be able to use it with your ".spa" file since this is not a standard Zip archive type. So, I think the workflow to open with The Unarchiver or to set the default app for this kind of file to The Unarchiver are your best options.

  11. 27 minutes ago, Chris Messina said:

    I still don't have an accurate mental model for Universal Actions...

    Universal Actions is, from Alfred's website:

    a new way to "take any text, URLs or files and perform actions on them from anywhere within Alfred or on your Mac using your Universal Action hotkey"... "The Universal Actions panel only shows you the relevant actions for the type of item you've selected."

     

    In other words, it's simply a new way to access a list of actions relevant to a specific type of selection (Files or URLs or Text) and is some kind of an extension to the File Actions.

     

    At the moment, when invoked while selecting a file, we have the same list that we had with File Actions, but with Keywords + Script Filters objects if you activates those in the Universal Actions preferences section.

     

    44 minutes ago, Chris Messina said:

    Why isn't unzipping included in the default actions?

    There was no zip/unzip action for File Actions before and no built-in actions were added at the moment. However, you can define your own action with a Universal Action object in a workflow.

     

    45 minutes ago, Chris Messina said:
    • Why doesn't Alfred Universal Actions include Extensions and macOS Services?

     That would be great, maybe that will be added later...

     

    48 minutes ago, Chris Messina said:

    Should @deanishe's workflow functionality be incorporated into Universal Actions?

    I just downloaded the workflow, I didn't really test it, but I can see that the File Action and the Script Filter object appear correctly inside the Universal Action list. However, it may be hard to know which one is which kind since they both have the same title "macOS Services".

     

    So, to use @deanishe's workflow functionality you need to first select the "macOS Services" action in the Universal Action list and then the list of Services will appear. However, I never tried this workflow before, but I'm not getting my files Services, so you may not get what you want, but at least I think this gives you the idea regarding how Universal Actions work.

  12. 54 minutes ago, Andrew said:

    @GuiB Ah you're quite right that there is a mistake in the default adding of workflow Keywords and Script Filters. These should only be seen in Universal Actions when there are single arguments. I'll fix this :) 

    Great then!


    What I wanted to mention with the "not well-defined" is that I'm questioning why some actions combine the items by default (ex: "Email" + "Email to..." action), but others don't... From what I can think of is that the Email actions work with multiple elements since the "File Action" worked with multiple files before Text Actions existed, but I'm wondering why other built-in actions don't combine the items to make other built-in actions possible (ex: "Copy as Plain Text").


    It's not a problem to create a workflow that would combine the items and then pop the Universal Action with the combined items as a single argument (and may be wanted in case that we don't want a new line between items), but I'm simply questioning if the default behaviour of the built-in actions should work in the same way as the "Email" actions so the behaviour is similar between each of them

  13. 2 minutes ago, Andrew said:

    This is exactly why you need to work out if your workflow is compatible and configure appropriately. If you connect the output of a Universal Action trigger (or any trigger with multiple items) into a Run Script or Script Filter, you'll get each item as a separate argv argument. If your Script Filter isn't compatible with that, it's best to set your Universal Action trigger to a single item only.

    You're right, it's the workflow developer job to make sure all the items are processed from the argv. I was just testing with the option active to see how it goes, but myself I find activating the "Keyword" + "Script filters" add too much clutter and prefer to add the Universal Action workflow object.

     

    7 minutes ago, Andrew said:

    I'm seeing both URLs open with Safari. What browser are you using?

    Again, you're right! Sorry, I created a script that is set as the default web browser and which send the open URL to the active browser instead of defining a specific one and my script was simply using the first item. Sorry for that!

  14. 1 hour ago, Andrew said:

    @GuiB one small improvement has been added which relates to something we were discussing, where Alfred will now prefix with https in the case of forcing the type to URL and no scheme existing. So now you should be able to say... "alfredapp.com" as type "url" and it will work.

    Great! That seems to be working great on my side, thanks!

     

    I'll let you know if I find other bugs, but for now, here are some bugs/remarks with this latest build:

     

    URLs Action: The "Open URLs" action only open the first URL when multiple URLs are used

    Example:

    tell application id "com.runningwithcrayons.Alfred" to action { "alfredforum.com", "alfredapp.com" } as type "url"

    Will only open "https://alfredforum.com" when using the "Open URLs" action

     

     

    Using multiple Text with the Text Action:

     

    It seems like the actions are not all well-defined between "single" vs "multiple" text actions. I mean, it is fine using a single text, but when sending multiple text items some actions will only use the first item and some will group them as they appear on the right preview (so joined with a new line).


    For example, the "Email" and "Email to..." actions work great since they combine the items together so they all appear in the email. However, the Keyword and Script Filter action from Workflows will only work on the first item, but appear in the multiple items list. So, maybe it would be better to group the items by joining them with new lines or simply not listing the Keyword and Script Filters actions when multiple items are sent.


    Also, I'm wondering if some of the Alfred built in actions should be added when multiple items are used. For example, why not add the "Copy as plain text", "Show as Large Type", "Save as Snippet"... to work like the "Email" actions by combining the items with new lines?

  15. On 7/22/2021 at 2:03 AM, PaperCloud10 said:

    The reason why I want to remap the hotkeys is so I can completely ditch Finder and force myself to use Alfred as my file browser, but the hotkeys weren't the most optimal.

     

    I actually also try to use Alfred as much as possible instead of Finder and for myself (and regarding your use case) I can't see what could be more optimal than having a direct shortcut to send your selected file to your editor of choice. Which is what I sent you in my first workflow example. You can put your selection inside the Alfred file browser to the file that you want to send to your favourite text editor and directly do the shortcut which will send it directly instead of needing to go inside the Actions panel.


    It's up to you if you prefer going into the Actions panel, but to show you how I'm doing it, I've configured a Hotkey trigger (set to work only when Alfred has the focus and that sends the Selection in macOS) with the Hotkey set to CMD+E ("E" for Edit) that send the select item directly to my editor of choice.


    Here is an updated workflow with a specific Hotkey trigger set to work the way I'm telling you (look at the first one, top left in the workflow). Set you preferred key combination (CMD+E on my side) and try it when you select a file in the Alfred File Browser.


    The difference between that one and the other is that the second Hotkey (like the first workflow I sent you) would work from anywhere, so it could be useful if you want to send the selection from Finder or inside Alfred or other file browser, but by restricting it to only Alfred you can configure a simpler hotkey that won't interfere with others.

  16. Hi, just an interrogation... Alfred default search can recognize URLs when "Recognise URLs" inside the "URLs / History" tab of the "Web Search" section is checked. Then, when we type a URL inside the Alfred search field, we can type a URL with or without its scheme and Alfred will interpret both as URLs.


    So, I was wondering if an option to "recognize" a URL without its scheme should be added to the Universal Action feature to make it coherent with the default Alfred search?

  17. 4 minutes ago, analogue_man said:

    In the workflow hotkey settings there are three specific options on how to handle kotkeys ("regular", waiting until all keys are released and passing through to workflow), thus I tried to solve my issue by creating a specific workflow and chose the option "waiting until all keys are released".

     

    Yes, that's what I was talking about in this paragraph:

    On 7/16/2021 at 12:44 PM, GuiB said:

    However, I thought that setting the option to "Wait until modifier keys are released" will block if I press another key that is not part of my double key trigger. I mean, if I press CMD, CMD+Shift+Left Arrow and release, I would think that Shift+Left arrow could be catched and break the CMD+CMD+Release combo (just an idea of how this could be improved)

     

    Which I thought was the way to fix it since Alfred should've been waiting that the correct action was done (all double tap key released and nothing in between), but I saw that it wasn't the case. At first I thought that since I was using the Pass through mode, then I was having this problem because I did 2 taps in sequence, but then I also released that the double tap gets registered even if another key is pressed in-between.


    So, I think the main problem is that Alfred doesn't detect that other keys are pressed (between or at the same time) during a double tap hotkey and block the action if this happens.

  18. 34 minutes ago, Stephen_C said:

    if you were tempted to try the 4.5 beta you'd probably find an interesting example workflow

    Yes, if you want to try the beta, I did a small example workflow on my side to test the different built-in text transformations of Alfred. I just uploaded the workflow which you can find here: https://d.pr/f/3zyqR2

     

    You can also simply replace the Universal Action objects for HotKeys that work on the selection if you want to activate them directly from a shortcut

     

     

  19. I'm often using the Large Type feature as a preview for my workflows. I find it great to be able to see larger content rapidly. However, at the moment we need to close the Large Type before going and showing another one from a different selection.


    It would be great if Large Type could be used in the same way as the QuickLook popup. By that I mean, to be able to use the Up/Down arrows to switch between the selection in Alfred while the content of Large Type gets updated automatically. I have sometimes been writing to files so I can use QuickLook as a workaround, but I would prefer to keep the content in memory.

×
×
  • Create New...