Jump to content

Alan He

Member
  • Posts

    341
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    Alan He reacted to vitor in Multi cursor snippets   
    Multiple cursors aren’t a standard macOS feature, they’re something specific text editors implement. In other words, you can’t add them generically because they wouldn’t work in most text fields, and Alfred’s snippets work everywhere.
  2. Like
    Alan He reacted to zeitlings in any method to save image from clipboard history to file?   
    Interesting! Alfred seems to cache the images on disk though: ~/Library/Application Support/Alfred/Databases/clipboard.alfdb.data/399627828244ea16ec127a51c3617aa532565270.tiff. I suppose all that is needed is for the file path to be exposed from the clipboard history, then you could push it to the buffer, copy it, or act on it through the Universal Action view. 
  3. Like
    Alan He got a reaction from iJemz in any method to save image from clipboard history to file?   
    From what I currently know, Alfred does not provide a direct way. At the moment, you can only activate the preview by pressing Shift, then open the preview, and finally click save. I would like to know if there is a more concise method. Of course, I can also develop another workflow, but it is not integrated with the current clipboard history workflow.
     

  4. Like
    Alan He reacted to Andrew in Workflow Import UI needs better text overflow treatments   
    I'll take a look at improving this on the import.
     
    This is a good indication that we need better documentation on how to use the UI config too, as in this example, the checkbox text is not following best practices. In this case, the checkbox text should really be "Always save the conversation to file", as that is how a screen reader (VoiceOver) would see the option.
     
    In this case, it would be best to have the label on the left as "Persistence" or "History", the checkbox as "Always save the conversation to file", then the first paragraph of the subtext as "Useful for not forgetting ChatFred's reply". Also, by keeping the labels / groupings as succinct, it will leave more space for the content of the preferences.
  5. Like
    Alan He reacted to vitor in Workflow updates don't show up in Gallery   
    If a user manually updates from outside the Gallery system, they’ll know they have done it and will have done so for a reason. The icon change will be immediate and they’ll know to ignore it for a day or two.

    On the other hand picture the case where an update has a potentially problematic bug¹ and it must be rolled back². Updating to a previous version becomes desirable. If the update icon remains there for a while, that’s a signal for the user to check what happened.

    Every approach has a tradeoff. Manually updating is bound to be more common³ than having to roll back, but if ever necessary the rolling back will be more important.
     
    All that said, I hope it goes without saying that the feedback is welcome and we’ll refine and improve as necessary. Also note that as a creator you can ping me if there’s something urgent.



    ¹ There was once an update which introduced an rm command which did not quote the variable it removed, which could potentially delete what was unintended due to the shell splitting on spaces. I caught it before adding to the Gallery and reported it to the developer who fixed it fast.

    ² Technically it would be a version downgrade but a functional upgrade because it would fix the regression.

    ³ Though still relatively rare.
  6. Like
    Alan He got a reaction from vitor in open-chrome-profile   
    thank you. and I fixed.
     
     
     

  7. Like
    Alan He reacted to vitor in open-chrome-profile   
    This will be live soon at https://alfred.app/workflows/alanhe/open-chrome-profile/.
     
    Another note: you have turned on “Alfred Filters Results” but then set the Keyword to “No Argument”. That won’t produce any results. Change it to “Argument Optional” and you get filtering for free.
  8. Like
    Alan He reacted to vitor in Prefer “with input as argv” For Running Scripts   
    When running a script from Alfred, be it a Run Script Action or Script Filter Input, always prefer with input as argv over with input as {query}.

    The former allows you to forego escaping the input so you can be confident whatever the user typed will be faithfully transmitted to the script. If you’re unsure how to pass your argument, see the placeholder text Alfred presents when switching languages: it teaches how to assign the input to a query variable. You do not have to do it specifically in that manner, acting on the input without assigning to a variable first works just as well.
  9. Like
    Alan He reacted to vitor in open-chrome-profile   
    Thank you. Rest assured, I will get to it like all your others already in!
  10. Like
    Alan He reacted to vitor in open-chrome-profile   
    You don’t need to ping me every time. I look at every post in this subforum and will get to everything. There are others also waiting, please be patient.
  11. Like
    Alan He reacted to andy4222 in How to show user input form?   
    Hi Alfred community, I'm working on a workflow that requires a user input form (like below) to show up so we can gather multiple input fields from the user. How can I accomplish that?
     
    Things thought/tried
    - I thought we could chain multiple Script Filters together, each asking for one input, but that isn't intuitive and the user can only see one input at a time. 
    - Another was using one script filter with separator between each input field ( input1<separator>input2<separator>input) and then split the input based on the separator. That isn't intuitive as well. The Alfred bar can only show few chars and user has to keep entering separator every time. 
     
     

  12. Like
    Alan He reacted to Andrew in Can't add Safari.app in Hotkeys (in Workflows) [Fixed in 5.1 b2130 pre-release]   
    If you update to Alfred 5.1 b2130, this should now work as expected
     
    Thanks for your help and patience with this.
  13. Like
    Alan He reacted to erusev in Is it possible to use emoji as icon in a script filter?   
    Being able to use SF Symbols as item icons would also be great.
  14. Like
    Alan He reacted to erusev in Is it possible to use emoji as icon in a script filter?   
    Being in able to set a character as icon would make it possible to use both emoji as icons and SF Symbols.
  15. Like
    Alan He reacted to Vero in Is There an Alfred Manual in PDF Format?   
    @zeissdistagon As Alfred is always evolving, a PDF document frozen in time would be outdated very quickly. As suggested by @xilopaint, your best bet is to either use the question mark followed by a topic you need help with in Alfred's search box itself, or to click the question mark in any preferences section or workflow object, which will take you to the relevant help for the object/feature
     
    And as ever, don't hesitate to ask here if you can't find the answer you need.
  16. Like
    Alan He reacted to everyonesdesign in Show lines count in clipboard history   
    Hello!
    Currently clipboard history shows number of words and characters; could you also output there number of lines, please?
    Thank you!

  17. Like
    Alan He reacted to vitor in brightness workflow   
    They’re not signed and notarised so it doesn’t address the problem. Those won’t even run on user’s machines so your code will continue to fail, just with a different reason.
     
    The point of the requirement is to ensure a degree of security and trust. All of this is covered in the pinned post and we talked about it before too.
     
  18. Like
    Alan He reacted to vitor in brightness workflow   
    No idea. At first glance it’s weird because they seem to still be quite active on GitHub and technically they don’t even need to make a new binary, just tag a new release (because Homebrew then takes care of the compilation). So theoretically this could be solved from a phone in under a minute.

    Maybe they missed that thread or no longer want to work on the project. It would be nice to have the update but ultimately it’s an open-source project released for free in (presumably) the author’s spare time, so it’s their choice.

    Someone could fork it and then submit the fork to Homebrew, though it would require people using that and there are still other open issues.
  19. Like
    Alan He reacted to vitor in 2fa-Read authentication code in your recent messages or current clipboard   
    @Alan He Your latest update to this workflow cannot go in the Gallery. The pinned post specifies that workflows cannot download extra software on their own, including with brew install.

    If you have an extra dependency, ask. The workflow already depends on node so it’s no trouble to add an extra on the Gallery.

    But the change won’t work either way. Homebrew’s SQLite is keg-only, meaning it’s not symlinked and won’t take precedence.

    If there is a version of macOS with a SQLite that is too old, let me know what that is and I can add that as a dependency.
  20. Like
    Alan He reacted to Vero in Sorting workflows   
    Alfred's Knowledge is based on a rolling 4-weeks window, so results you selected six months ago won't have an impact on prioritisation. You can read a bit more detail about Alfred's results ordering here:
    https://www.alfredapp.com/help/kb/understanding-result-ordering/
     
    @vitor then described the latching behaviour which is point 2 in the link above.
     
    If, out of those programs, there are some you don't want to see in results as they're unwanted installed apps (e.g. when Adobe installs so much nonsense extra stuff), you can drag those to Spotlight's Privacy tab, then type "reload" into Alfred, and those apps will be excluded altogether from results.
  21. Like
    Alan He reacted to vitor in Getting Bundle ID, Release Version Number, App icon of apps   
    The av Script Filter is still using /usr/local/bin/node. Once that’s fixed, it should be good to add.
     
  22. Like
    Alan He reacted to vitor in 2fa-Read authentication code in your recent messages or current clipboard   
    Working now. Will be live soon at http://alfred.app/workflows/alanhe/2fa-read-code/.
  23. Like
    Alan He reacted to vitor in Getting Bundle ID, Release Version Number, App icon of apps   
    There is an auto-updater in the workflow. Please remove it. There is a stray Replace Utility in there.
     
    Using /usr/local/bin/node will not work with a Homebrew-installed node on Apple Silicon. Use just node so it works for everyone. This is explained in detail in another post.
     
    In the JSON, adding a "type": "file" to results will make it possible to use your Universal Actions directly from the results.
     
    The Universal Actions are a tad inconsistent. one has all caps (ICON), one is all lowercase (version), and the others are a mix. Please normalise those.

    There is also an extraneous space in the subtitle, where it says ( from App Store). This one is minor, but since other changes are necessary, it felt worth mentioning.
     
  24. Like
    Alan He reacted to vitor in Access clipboard history from scripts or other Apps   
    Yes, by reading the SQLite database:
     
    To get the second item, in bash/zsh:
     
    /usr/bin/sqlite3 "${HOME}/Library/Application Support/Alfred/Databases/clipboard.alfdb" 'select item from clipboard where dataType = 0 order by ts desc limit 1 offset 1;'  
  25. Like
    Alan He reacted to vitor in 2fa-Read authentication code in your recent messages or current clipboard   
    The node_modules are stopping this from being added. Specifically, there’s a node_modules/sqlite3/lib/binding/napi-v3-darwin-x64/node_sqlite3.node unsigned binary which is only compiled for Intel. That means it won’t run on users machines as is.
×
×
  • Create New...