Jump to content

vitor

Staff
  • Posts

    8,628
  • Joined

  • Last visited

  • Days Won

    719

Posts posted by vitor

  1. 3 hours ago, jgacitua said:

    The workflow you created is really helpful, thank you for your work and putting it out there.

     

    Thank you for the kind words.

     

    3 hours ago, jgacitua said:

    I wanted to be sure my question was understood.

    The plan is seeing Google Drive folders on the Universal Actions window,

    when choosing move to  or copy to for example.

     

    Yep, I understood what you meant. My answer still applies.

     

    3 hours ago, jgacitua said:

    Is it in your plans to create a workflow for that?

     

    But your request got me thinking. While a Workflow can’t override those Copy and Move actions (which is by design, and a good thing), we can add new ones geared specifically to move and copy to Google Drive folders.


    Here’s a version which does just that. I’ve tested it and it seems to be working well, but do you want to give it a spin before I make the release official?

  2. 6 hours ago, Ahmed83 said:

    Is it possible to save a specific Clipboard History item as a buffer?

     

    I’m not seeing a way for that to work without sacrificing the buffer’s flexibility. The buffer allows you to act on things but also to drag them out. Dragging the representation of a piece of text wouldn’t work universally. For example, in macOS you can select a piece of text and drag it out to the Desktop to make a .textClipping file. Which seems like it might get us partly there, until you realise you can’t drag it to arbitrary places and have it paste the text.

     

    7 hours ago, Ahmed83 said:

    just want to save the item for some time while i'm working.

     

    NoteTaker was built specifically to fill that need.

  3. Welcome @jgacitua,

     

    A Workflow is needed for Google Drive because Spotlight doesn’t index it, so those directories won’t show up just by typing. But if you start with a / (forward slash) you may be able to navigate into them. Or it there’s a directory you frequently copy into, you can make a Workflow from a File Action Triggers to a Run Script Action with default settings and Script mv "${1}" '/PATH/TO/TARGET/DIRECTORY/HERE' (mind the quotes).

  4. 1 hour ago, Handcuffs said:

    Is this possible to be added to the workflow to match the functionality with v7? The fallback search doesn't quite work the same way. 

     

    Welcome @Handcuffs. Not at the moment.

     

    1 hour ago, stenti1 said:

    I attempted to follow the  terminal instructions.

     

    Welcome @stenti1. That part is missing from your report. I need to know the Terminal output because everything else seems fine.

  5. 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
    
  6. 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.

×
×
  • Create New...