Jump to content

Stephen_C

Community Hero
  • Posts

    1,347
  • Joined

  • Last visited

  • Days Won

    65

Posts posted by Stephen_C

  1. @sepulchra thanks for the kind comment. I'm currently doing a couple more (on List Filters but also covering basic variables in the process). I'm slightly conscious of the fact that some of these are getting rather long (particularly with all the screenshots) and don't want to "bomb" the forum!

     

    I'm unsure what the Powers That Be think of all of this 😁 but currently I'm prefacing the title of each with "Simple ideas:"—with the aim of making them easy to find should anyone wish to do so.

     

    Stephen

     

  2. Background

    I’ve posted this workflow before but I’m going to dissect it to show you some of the features available in a really simple but useful workflow. Of course, there’s an Alfred Universal Action to move a file or files but there’s also a way to create a quick shortcut to that Universal Action. That’s what this workflow does but it’s worth looking under the skin to investigate some of the details.

     

    The skeletal workflow

    MoveFiles.png.906a27f9cbbb4d24e088cf78eb668909.png

     

    The explanation

    1. We use a Hotkey Trigger rather than a Keyword Input because we want something that's quick to use. Double click on a Hotkey Trigger and take a moment to look at the options (see next screenshot but one). We choose “Pass through to workflow” as opposed to “Show Alfred”. The Argument is “Selection in macOS” because we’re wanting to move a file or files selected in macOS. If you click on the “Related Apps” tab you can add Finder in order to ensure the hotkey works only when Finder has focus:   RelatedApps.thumb.png.e70948abc59f46884e9624449794a703.png

     

    Tip: Use that to ensure your Alfred hotkeys work only in the apps where you want them to work—or to use the same hotkey in different apps triggering different features in each app.

     

    Return to the Hotkey Settings tab and click where indicated:

    ClickForPassThrough.thumb.png.f5f7f036df6bbace1f12ab2702e6e678.png

     

    Then you’ll see the following:

    PassThrough.thumb.png.b01a778190a3aac491534208aeedf06f.png

     

    We check “Pass through modifier keys (Fastest)” because we want the fastest possible reaction from Alfred when we have a file or files selected and we then press the hotkey.

     

          2. The Action in Alfred dialog has a little trick up its sleeve (double click on the Action to open the dialog box):

    JumpDialog.thumb.png.4a773ee4e3253475126daa2a7f03a2ca.png

     

    We limit the “Treatment:” to “File” and (the trick) change “Jump to:” from a blank to “Move to…”. That way we have instant access to Alfred’s “Move to…” Universal Action. (The other things to which you can jump, bypassing the list of Universal Actions, are Recent Documents…, Open With…, Open URL in…, Email to…, and Copy to… .)

     

    In conclusion

    When using a workflow like this all you need to do to move a file (or files) in Finder is to select it (or them), press the hotkey and start typing, in Alfred’s window, the name of the folder to which you wish to move the file or files. When the relevant folder name is displayed simply press to move the file or files to it. But even in a simple workflow there’s a lot going on behind the scenes.

    Stephen

  3. @moonshot don't be discouraged: you're getting pretty close.

    • If you're starting with a keyword you don't need to complete the workflow configuration (when the workflow is for your own use). Simply double click on the keyword action and type the keyword you want to use.
    • Similarly, you can add directly the path to your screenshots folder by double clicking on the first Automation Task (Folder Contents

    2.thumb.png.4ba744dc15e90e96b0787f679e35aafa.png

    • This shows you how to access the dialog to change the Alfred window behaviour:

    CleanShot2024-03-31at12_56.04@2x.thumb.png.f3297595335ecffe39f5dc179c3cfdf4.png

    Then just check the Window Behaviour box towards the bottom of the dialog. That will change the connector icon from a circle to a square.

     

    Stephen

  4. Background

    Many times a day I open my ~/Downloads folder in various sizes and shapes of window. However, I have a preferred size and shape for that Finder window and, with a very simple Alfred workflow, it's easy not only to cater for that but also to add some useful options.

     

    The skeletal workflow

    Opencustomfolder.thumb.png.9c8ce8a2d5cb881887ea5df1696814d4.png

     

    The explanation

    1, 2 & 3 are all you need for the basic workflow. The remainder are the icing on the…workflow.

     

    1. I use a Keyword Input because I find it difficult to recall all the hotkeys used in my various apps. Of course, you could use a Hotkey Trigger if you wish.
    2. This is a simple Open File Action containing the path to the folder you wish to open.
    3. We use an Automation Task to set the bounds of the Finder window exactly was we want them.
    4. This is where we are Using Alternative Actions so that ⌥⏎ will take us along the new path in the workflow. Note, in the same Action, we also tell Alfred not to close Alfred's window in order to prevent flickering. (To access the Alternative Actions simply double click the round marker along the connecting line after an input object.)
    5. An Automation Task passes the contents of the folder (choosing, in my case, to sort by most recently added) to…
    6. Alfred's Grid View—where we can see the contents of the folder displayed in a grid (set to "Keep the results in order defined”). In that view we can search for any item, use ⌘O ("O” for "open”) to open any selected item in its default app or just press to move on to action the item in Alfred.
    7. Again we keep open Alfred's window (as in 4 above).
    8. The Action in Alfred action provides access to Alfred's Universal Actions appropriate to the selected item (allowing you, for example, to delete or move the item, open it in Finder, etc.).

     

    In conclusion

    Sorry for the long-winded explanation of a very simple workflow. Once you have it up and running you may, like me, use it many times a day and everything very soon becomes second nature.

     

    Incidentally, there's a splendid workflow from Vitor on the Alfred Gallery called Thumbnail Navigation which allows you to navigate the file system with previews…so you may never need anything similar to what I've described here. But you don't learn as much using other's workflows as you do when writing your own, do you? 😉

     

    Stephen

  5. Apologies for the earlier rush. While lunch bubbles away on the hob I've had time to be a little more helpful. I think something like this might work for you:

     

    CleanShot2024-03-30at13_18.12@2x.thumb.png.578b4d83bc2c5d9fafdb29207ffd8f36.png

     

    Automation Tasks are very helpful here.In the first one all you have to do is to choose the right task then click on the folder icon in it and choose your screenshots folder. Then when you press whatever hot key you choose the contents of that folder will be displayed in the Grid View. Press ⏎ on a selected image to see it in Image View and ⏎ again to copy it to the clipboard (using another Automation Task).

     

    Does that help—or does it still feel too cumbersome?

     

    Stephen

  6. 5 minutes ago, moonshot said:

    I  tried using the the transfer.sh from the command line

    You should just be able to drag and drop the workflow in transfer.sh.

     

    6 minutes ago, moonshot said:

    I've uploaded the workflow to a public page on notion - can you download it from here?

    Not so far as I've been able to discover!

     

    I'm a little involved cooking lunch just at the moment 😀 but in essence what you want to try (assuming you're using Alfred 5.5—which is the latest version) would be something based on my Search for PNGs workflow. You'd want to take various pieces of that (e.g. passing on folder contents, filtering them and the Grid View and Image View) and then linking the Image View to the Copy to Clipboard output.

     

    Sorry this is not, for the moment, more helpful: I'm a little short of time! No doubt others can help if all of this is still challenging. Rest assured, what you want is do-able.

     

    Stephen

  7. Sadly I can see you on the video but the demonstration of what you wish to do is blank.

     

    However, if you already have a workflow to open your screenshots folder and display the screenshots it may simply be a matter of adding to that workflow a Copy to Clipboard output (if appropriate checking the option to paste to the frontmost app). You may need to check what the default output option is from the screenshot display (see the commands at the bottom of the display) but it's possible one of them is already "Copy to clipboard”.

     

    If all of this seems double Dutch (with no disrespect to the Dutch) it would be helpful to upload somewhere (like transfer.sh) the workflow you want to try to modify so we can see exactly what needs to be done.

     

    Stephen

  8. 2 minutes ago, moonshot said:

    Or is there a workflow for this?

    I guess that depends on how and where you save your screenshots that you wish to recall. For example:

    • Are they always saved into the same folder?
    • Are they always saved as PNGs?
    • Do they have some sort of standard filename?

    More constructively, it would be easy to build a workflow that displays all PNG files in a specific screenshots folder—allowing you to select one and paste it into the frontmost app.

     

    Stephen

  9. I'm sure I'm preaching to the converted but there are some really easy, useful things you can do with Automation Tasks in a workflow. I'll give you an example.

     

    I have frequently to battle with a reasonably deeply nested menu in Day One in which I can turn off, or on again, smart quotation marks. (Tip: don't have a workflow called Save 'ur… something!). Finally, this morning, realisation slowly dawned. Keyword: dss, linked to:

    Substitutions.thumb.png.dff3643b56ad4e36f1d9a309cf5ac1c9.png

     

    Now why didn't I think of that before?

     

    If you suffer from deeply nested, often used, menu items…well, there's a possible solution!

     

    Stephen

  10. 6 hours ago, lesormonde said:

    I killed istat menus and the bowler hat has reappeared.

    While that may have resolved the problem for you I'm not sure why—because I, too, use iStat Menus and can show or hide the Alfred menu bar icon depending on my choice in Alfred Preferences. However, I do use the Bartender menu bar app so maybe it's a mattter, for you, of the quantity of menu bar items rather than any inherent conflict. Just an idea…

     

    Stephen

  11. Following the difficulties covered in the preceding posts I've released version 1.41 of the workflow. There is no change to the workflow itself but I've added to the ReadMe the following note:

     

    Quote

    The first time you run the workflow you will see a dialog from macOS stating "Alfred would like to control CleanShot X. Grant access to this application?" You must agree to grant access for this workflow to work.

     

    Stephen

  12. 4 hours ago, david96161 said:

    I found another topic that went through all of this exhaustively on Monterey

    But did you follow all of the steps outlined on the Alfred help page linked earlier in the thread? If not, please do that—following each suggested step carefully (even though you may have done some already).

     

    If you still have problems run one of the files which Alfred cannot find through Alfred's inbuilt troubleshooter (as indicated on the help page) and post the results here.

     

    As you've mentioned Dropbox it will be worth checking you've ensured Dropbox files are made available offline.

     

    Stephen

  13. Welcome to the forum.

     

    43 minutes ago, lesormonde said:

    I recently migrated to a new M3 MacBook pro running Sonoma.

    Did you migrate your apss and preferences using the Migration Assistant.app? If so, have you tried simply re-installing Alfred? (The Migration Assistant is known for sometimes producing rather strange results after it has been used, which is why I asked.)

     

    Stephen

×
×
  • Create New...