Jump to content

amahabal

Member
  • Content Count

    9
  • Joined

  • Last visited

  1. 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
  2. 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
  3. 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
  4. 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...
  5. It depends on the query (which is coming in through vars). Here, I show some results when the query context is "Alfred". The distinct logo tells me that this is the context. When the context is a URL, it can be very long and I can't stuff it into the query box and still have space for additional words that filter down the result set.
  6. 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
  7. 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
  8. Thank you for such a detailed response! The behavior you demonstrate here is what makes communities function so well.
  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...