Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Everything posted by deanishe

  1. No. Terminal Command is for sending commands to your terminal application. Use a Run Script action with language set to /bin/bash instead.
  2. The above still works in Alfred 3. You're doing something else wrong (possibly you need to change the input to input as {query}). Please post your non-working workflow, so we can see what isn't working and perhaps tell you why.
  3. Here's a workflow that scrapes results from a webpage and shows them in Alfred. Here's a tutorial on writing Script Filters (i.e. showing your own results in Alfred) and here's a tutorial on web scraping with Beautiful Soup. Beautiful Soup doesn't support XPath, but it does support regexes and a subset of CSS selectors. You can use XPath selectors with lxml, but that can be a bit of a pain to install on OS X.
  4. You don't think calling someone "naïve" is insulting?
  5. Not currently, no. It would also only possible to implement in the same way Typinator and Text Expander do it: by popping up a dialog box containing the snippet fields. That is to say, you can't build a "universal" snippet engine that works with every application and lets you tab around in the active application document itself.
  6. The script doesn't make sense. CLIPBOARD=$(pbpaste -Prefer txt) but done < <(echo $query) Where does $query come from? Should that line read done <<(echo $CLIPBOARD)? Alfred doesn't "interpret" your scripts in any way. It passes them straight to whichever program you've specified to run them (with the single exception of replacing {query} if you have it set up that way). However, it's important to remember that Alfred doesn't use your shell environment. In particular, if you call, say, python expecting that to be /usr/local/bin/python, your script may not work because /usr/local/bin isn't in PATH in Alfred (or any Mac application). You'll get /usr/bin/python instead.
  7. You can do it with AppleScript: tell application "Pages" to make new document
  8. Not really. You can kinda-sorta do it by simulating keypresses or mouse clicks. Double-click selects the word under the cursor, so you can use Keyboard Maestro to simulate a double click at the cursor, or use the free cliclick to do it with cliclick dc:$(cliclick p | cut -d: -f2 | xargs). Alternatively, you could use AppleScript (or Keyboard Maestro or cliclick) to simulate ⌥←, ⌥⇧→ (OPT+LEFT ARROW then OPT+SHIFT+RIGHT ARROW), but that works on the text insertion cursor, not the mouse pointer. As applications don't generally make their documents' contents accessible, selecting the same word elsewhere in the document is out of the question unless the application has a command for that feature (such as ^⌘G in Sublime Text).
  9. Do you insult everyone who tries to help you, or did I win some kind of lottery?
  10. I don't think there's much chance of this being implemented. Similar requests haven't made it, and the underlying problem—your script is too slow—can be solved in other ways. You could generate the HTML in a background process, so the results are still shown quickly. You could use a faster language than Python (which is very slow) for the HTML generation. Objective-C or Go would be 10–50 times faster. Or you could start a simple HTTP server that generates the Quicklook previews on-the-fly, and use a URL to that as your quicklookurl.
  11. I don't know. It depends how you want the workflow to work. The simplest thing is probably to create a new sticky from the clipboard contents, by putting the following in a Run Script (Language = /usr/bin/osascript (AS)) action and connecting it to a Keyword or Hotkey trigger: tell application "Stickies" activate -- wait half a second for Stickies to come to the front delay 0.5 tell application "System Events" -- simulate ⌘N keystroke "n" using command down -- wait half a second for the new note to be created delay 0.5 -- simulate ⌘V to paste clipboard contents to new note keystroke "v" using command down end tell end tell
  12. It takes some time to load if you have a lot of workflows. If waiting doesn't help, then you'll have to post a proper error report including whatever is in Alfred's debugger.
  13. No, I'm referring to Path Finder's scripting dictionary, which you can read in Script Editor. Check out Script Editor's File menu.
  14. You should read the application's dictionary in Script Editor. The open command takes a file path (or multiple file paths): tell application "Path Finder" to open (path to home folder) You probably also want to activate the app: tell application "Path Finder" open (path to home folder) activate end tell
  15. If you select the desired result a few times for the query, Alfred will remember and make it the top result again.
  16. You could put a dialog box after the File Filter, but the "normal" Alfred way is simpler and faster.
  17. That's not how Alfred works. Click on one of the connections and assign a modifier key, e.g. ⌘ The you hit ↩ to open file or ⌘↩ to reveal in Finder.
  18. That's included in the workflow. What did you download? Indeed. You need to change the Run Script action from tell application "Alfred 2" to search "{query}" to tell application "Alfred 3" to search "{query}"
  19. It looks like the internal name for the Alfred 2 search command. Change it to tell application "Alfred 3" to search "..."
  20. You can't do very much with Stickies because the app isn't scriptable. All you can do is simulate keypresses. Creating a new sticky is doable. "Exporting" one to Notes is trickier.
  21. PSA: Lastpass is programmed by idiots. A password manager written by folks who use fake password fields is probably something to be wary of…
  22. Yeah, that's actionable. If you only have a few tags, that's very easy to implement as File Actions with a tiny bit of scripting. I already have a workflow that does pretty much exactly this for my most common tags, which I'd be happy to adapt for you. If you have quite a few tags, or think you'll want to add new ones, it can be done with a Hotkey + List Filter + a bit more scripting. In either case, you'll probably have to select the files in Finder in order to tag them. You can't just hook into arbitrary apps and monitor their save operations. I can put that together for you tomorrow. But please let me know exactly what you have in mind. Happy to write it for you, but I don't want to have to rewrite it for you because you weren't clear about what you wanted.
  23. They can both be done, but Alfred can't do it natively. Also, Alfred doesn't do anything "automatically". You have to tell it to do something. That's the way it's designed. Again, if you can be more concrete about what you want to do and how, I can perhaps give you a concrete solution.
  24. I think you're going to have to be clearer about what it is you're talking about. What do you mean "metadata"? A tag? A Spotlight comment? An ID3 tag? And how do you imagine it will be added? In your program's UI (whatever that program is)? Via Alfred's input box?
×
×
  • Create New...