Jump to content

amahabal

Member
  • Posts

    13
  • Joined

  • Last visited

Posts posted by amahabal

  1. I will give that a shot.

     

    Regarding performance: I am sure it can be done in a way that those workflows that don't use this feature pay little penalty. On the other hand, I suppose, everyone will start using the shiny  features if they are there, and adding the feature is thus dangerous. On the third hand, if everybody uses the feature, it must be a useful feature and thus worth adding.

     

     

  2. The powerful mechanism of the Script Filter allows for the specification of the title, subtitle, and icon. Is it possible to style it beyond this?

     

    For instance, can the title text be styled with different fonts, bolding, etc? Can the background color be specialized for a single result?

     

    I am writing up a description of a new workflow for Tinderbox, but in the meanwhile, I can mention one component now: for a Tinderbox note, the query in the Alfred query box is text-matched to a list of fonts, allowing the user to change the font for that TB note. When a partial font name has been typed, many fonts may match. I show the names right now, but would certainly prefer to render the name using that particular font, if that is at all possible.

     

    Thanks!

      Abhijit

  3. I was trying to write a pandoc based flow to write my gmail messages in markdown, press a key, and have them transformed into richer layout.

     

    The problem: the ⌘C in gmail captures HTML, but what I could get from the Alfred clipboard was the text, which stripped out newlines (well, they were NOT newlines but <div></div> tags and what reached me was the text). To test this, in a gmail tab, type A, B, C, one per line, copy it, and paste it on to the command line in a Terminal: we get "ABC", all on one line. If you paste it into gmail, though, we get the original back. Alfred just seems to behave like the terminal.

     

    I worked around this by using the Python module https://pypi.org/project/richxerox/ (which allows access to the clipboard's HTML, Rich text, or Text), but it would be far more convenient if Alfred could somehow make that available when we specify for a HotKey "selection in macOS".

     

    Or maybe it is available, and someone will tell me how to use it :)

     

    Thanks!

      Abhijit

  4. Looking into this, seems interesting!

     

    Although I got the system working, I cannot figure out how to write ToDos in my markdown files. The comment seemed to suggest that I should do a minus followed by the todo in square brackets (i.e., - [my todo]), but Typora converts that to an unnumbered list and "mdt" says it found no ToDos.

     

    Thanks,

      Abhijit

  5. Thanks, @deanishe, I followed your suggestion and it works reasonably well.

     

    Do you know what happens if two results have the same UID? One way I could simulate this "top order fixed" behavior is to have the fixed items share UIDs. Quite soon, they will be the most popular follow ups and will show as a group at the top, ordered by the order they were seen in responses. But this strategy hinges on how repeated UIDs are treated.

     

    --Abhijit

  6. In a workflow, I had an NSAppleScript containing this line:

    set thePerspective to system attribute "DESIRED"

    I then also added a display dialog to show the value. I was getting nothing. I added a debug before that, and sure enough, the variable was set.

     

    I then replaced NSAppleScript with RunScript with OSAScript as the language, and no other changes (except, of course, "on alfred_script" --> "on run"), and it worked fine.

     

    Any ideas what is going on here?

     

    I had assumed the two to be drop-in replacements... 

  7. Thanks for the response, @dfay. I do use subtitles for information about the items. What this top item is doing is information about the entire list of responses.

     

    What I am doing is this: I  have set up a system, backed up by a local database, where I can set up sets of contexts (people, projects, etc), and for which I can capture URLs, file links, and other bookmarkable paraphernalia. Now, for a given hub, all these possibilities are shown, plus other possibilities such as "Create an omnifocus project for this" (shown only if none exists), "Create a Devonthink group", etc. All the heavy lifting is done by python scripts, and Alfred's role is showing the responses and shuffling state around, and enabling the possibility of filtering down shown responses based on what I type in the box. The box real estate is thus at a premium, and I don't have space to show what item the responses are for (the python script gets it through variables, not through argv).

     

    What I need, then, is a way to show a response at the top announcing "This is me!". Currently, I do have that, but it can be anywhere. A distinct icon helps me see it if it is in the top 9, but a little additional UI assistance from Alfred will help.

     

    Hope that explains the strange request :)

  8. For a Script Filter, I want to use Alfred's smart ordering, which one can produce by passing in uid's to items. However, I want to exclude precisely one item from this, which I always want to be the top result. Is there any way to get the best of both worlds? 

     

    Incidentally (and maybe this should be a separate question), in my system, this fixed item is always (intentionally) invalid: it is additional information that just hangs in there. Is there any way to make the default selection (what gets actioned if we press return) start at the first valid entry? 

     

    Thanks!

      Abhijit

  9. New here, loving Alfred :)

     

    So I wrote my first script filter and it works. The possibilities are indeed immense!

     

    My script just outputs "items" as the top level entry in JSON. But an example suggested that I could also output variables. Where can I read about all possible output keys?

     

    Relatedly, if the next item in the workflow is a script, I believe that it gets the "arg" of the selected item. Is there any way to access the title, the variables in the previous section, and so forth?

     

    Finally, what is the lifetime of these variables? (i.e., What if the same script in the same workflow runs again?). My prior experience is with Keyboard Maestro, which has global variables that seemingly live forever. (Oh, and does alfred have long-lived variables?)

     

    Many thanks!

      Abhijit

×
×
  • Create New...