Jump to content

vitor

Staff
  • Posts

    8,494
  • Joined

  • Last visited

  • Days Won

    708

Posts posted by vitor

  1. 1 hour ago, gedeyenite said:

    One can always switch to Android.

     

    Welcome to the forum.


    Switching to Android wouldn’t do anything because I was talking about macOS, not iOS. But even if I were talking about iOS, switching to Android would still not do anything because as far as I’m aware it doesn’t have ubiquitous automations capabilities and no AppleScript. So essentially in response to “I’m unhappy about this thing in this platform” your suggestion was “switch to another platform which also doesn’t have the thing you want”.


    I don’t want to switch to Android. I don’t like it. I don’t like everything about iOS either, but as a whole it fits my needs considerably better. But I don’t have any interest in flamewars; everyone should use what they prefer.


    More importantly, though, I was wrong. Apple did not kill AppleScript when they introduced Shortcuts. They haven’t extended it either, but Shortcuts has direct support for AppleScript which proves they at least acknowledge it. And they do not require a developer account to share automations and there’s no indication they will.

  2. @JolinM @AntidoteConnect @TheThunderChimp I wasn’t going to say anything when it was just two messages, but now that we’re up to three people and you’re preparing for more… Please refrain from (publicly) using languages other than English in these forums. I know you’re not saying anything bad (and are in fact being quite polite) but it creates a barrier which makes it harder for other users to access the conversation and is harder to moderate.

  3. All you have to do is use the screencapture tool which ships with macOS to take the screenshot, then compress it. It’s done in three short lines in a Run Script Action with default options:

     

    readonly image="${HOME}/Desktop/$(date).png"
    screencapture "${image}"
    open -a 'ImageOptim' "${image}"

     

    If you want the screen capture to be interactive, change the second line to screencapture -i "${image}". If you want more options, open a terminal and run man screencapture.


    This method will open ImageOptim’s GUI, though. I’ve opened a pull request with one of the Workflows you linked to add support for an External Trigger. Meaning that if they merge it (or just download this version which is ready), you can replace the third line from above with:

     

    osascript -e "tell application id \"com.runningwithcrayons.Alfred\" to run trigger \"optmize_image\" in workflow \"ws.willner.alfred.imageoptim\" with argument \"${image}\""

     

    And it will do what you want.


    To trigger the code, use whatever you want. You’ll likely want a Hotkey Trigger. If you want to use the default screenshooting shortcuts, you’ll have to disable them from macOS in System Preferences → Keyboard → Shortcuts → Screenshots.

  4. 53 minutes ago, Undertaker01 said:

    I would definitely pin the workflows that I'm working on

     

    I name those with leading _. And if one needs further priority, I add more. When they’re ready, there is a single visible place that needs changing.

     

    This is not an argument against pinning, I’m just explaining the method I use and that you may want to replicate.

  5. 1 hour ago, armenaton said:

    I know that you can basically do that by running a query on every keystroke (i.e. disabling "Alfred filter's results"), but I'd rather let Alfred search the JSON in a smart way than writing the search completely myself.

     

    Can’t have it both ways, it’s either one or the other. I think there’s an open Feature Suggestion to optionally make Alfred filters results show No results found, but I’m not finding it.


    But what you seem to want is a way to, on no results, have another result that is itself actionable. That is trickier to implement and fit into the GUI. I don’t expect it to happen.

     

    Writing the search yourself isn’t complicated. But it might be easier if you make a Keyword Input for the no-results case and make its keyword the same as in your Script Filter. It will still show up even when there are results, but it will either be the absolute first of absolute last item (depending on what’s the norm) so it’s easy to ignore.

  6. 6 hours ago, Undertaker01 said:

    There's always going to be a few people that would benefit from folders, and the people that don't necessarily want them now might end up using them if they're ever implemented.


    “A few people” is an important keyphrase. When a feature is considered, it has to be weighed on its cost (how difficult will it be to implement; how will it disrupt other features and how many users that will inconvenience and to which degree) versus its benefits (how many users will benefit how much from its existence).

     

    Has Folders for Organising Workflows crossed the threshold to where it’s worth to be implemented to the detriment of something else? (This is inescapable: if you spend time on one feature, you do not spend it on another.) @Andrew and @Vero have shown to have a good pulse for this over the years and I trust their call. I’d wager that at this point they’ve considered this and had it at least marinate.

  7. Please don’t open multiple threads for the same issue. In addition, this one is an XY Problem, in which you’re asking about a solution instead of your problem. That doesn’t help you because it makes you learn the wrong thing. If you want things to work, you need to patient and do them the right way. I’ve already answered this in the other post.

  8. 3 hours ago, BerryTaylor said:

    First,  File Action Trigger deals with file instead of folder


    No, File Action Triggers deal with paths. Commonly those are files, but folders work just the same.

     

    3 hours ago, BerryTaylor said:

    Second, it cannot pass the paths to be the input of my next script.


    Do that in the Python part.

     

    If you need more specific help, you’ll need to upload and post your Workflow.

  9. 19 hours ago, BerryTaylor said:

    the only way I can put the selected file to my script is to use file filter


    Why? It sounds like what you want is a File Action Trigger.

     

    19 hours ago, BerryTaylor said:

    But when using file filter, I cannot see the list of files in the folder, since it will only list files that match the searching text.


    Navigate into it. You can enter that from a regular file search, or File Filter, or a multitude of other ways. The default shortcut is ⌘↓.

     

    19 hours ago, BerryTaylor said:

    That is stupid for Alfred. Why don't it list all the files before the filter works?


    I get that you’re frustrated, but venting is counter-productive. It makes your report hard to follow. I don’t even understand what you mean with that second sentence.

     

    It seems like you’re simply using the wrong tool for the job, or misusing/misunderstanding the right tool. Either way, if the above didn’t cover it, what we need from you is a clear thorough description of what you want.

  10. Welcome @Maciej Swoboda,

     

    3 minutes ago, Maciej Swoboda said:

    but the file is present in the Desktop folder.

     

    Are you sure? Because that message comes from the TinyPNG API, not the Workflow, and is exactly what happens when you give it a path which doesn’t exist. The file needs to be a PNG named exactly tinypng panda.png


    It also might help if you explain why you are using the External Trigger. That’s for advanced usage.

  11. 15 minutes ago, Undertaker01 said:

    Like searching the data within a file. Like when you search something in finder it also searches the contents of the file if it's a text document. That's what I was thinking of.

     

    Your example is not searching within anything, so I still don’t get how it would work. Specifically:

     

    4 hours ago, vitor said:

    You type p and then what? Does it show pp, play, or neither?

     

    Walk me through the exact behaviour in Alfred. Perhaps I’m misunderstanding and can think of a workaround. As it is (i.e. my current understanding), I don’t see it as either possible of likely to be implemented.

×
×
  • Create New...