Jump to content

dfay

Member
  • Content Count

    847
  • Joined

  • Last visited

  • Days Won

    42

Posts posted by dfay


  1. I've moved all my snippets from TextExpander to Alfred, and it's actually pretty easy to create the equivalent of a nested snippet using snippet triggers in a workflow .  Not as simple as in TE but easy to do if you don't anticipate continuously creating a lot of new ones (which is still easy but a bit of work.)

     

    Here's an example:

     

    https://www.dropbox.com/s/xu8afkqd4hfzgn2/nested snippets.alfredworkflow?dl=0

     

    The snippet values are stored as environment variables and the first two snippet triggers show how to use them.  The third shows how to use a list filter to replace the address value on the fly.  

     

     


  2. I was focused on speed of entry hence the fixed folder.  Otherwise there’s either a fourth string to include in the text or an additional entry box.  By that point you might as well open preferences and do it natively.  It might be possible with a file filter, though - let me look.


  3. Just figure out why you can't drag these.  As hinted at (but not really explained) here 

     

    the draggable area is only the border padding.  Which is set to as small as possible in these - which makes them look so good imho.  But it also makes them almost impossible to drag (there's actually a tiny square in the top left where you can drag...).

     

    @Andrew could you consider allowing some other theme elements to work as drag handles?

     

     

     


  4. These are in the environment variables for the workflow.  You can set them through the GUI without editing the script - you click the [x] icon in the top right of the workflow screen, and a panel will drop down where you can set them.

     

    I believe the devs recommend against using iCloud Drive for Alfred's preferences.  But in any case you should be able to go to your Alfred.alfredpreferences file location (as set up in Settings > Advanced > Syncing > Set preferences folder... ) then add /snippets/ to the end of that path.  

     

     

     

     


  5. See 

     for the background.

     

    Snippet Creator

    adapted from https://github.com/derickfay/import-alfred-snippets

     

    There are two keywords, both of which result in the creation of a new snippet:

     

    sc - (single step) Required fields: name|keyword|content -- separated by |

    sc2 (multi step) - Enter the snippet text, then you'll be prompted for the keyword / name -- in the interest of speed and simplicity the name is set to the keyword.

    sc2 also has triggers to pre-population with selected text or clipboard contents

     

    set prefsPath in the environment variables to the path to your snippets folder - e.g. "/Users/someuser/Dropbox/Sync/Alfred 4/Alfred.alfredpreferences/snippets/"

    and newSnippetFolder to your desired target folder

     

    The workflow posts a notification on success to remind you of your newly created snippet.

     

    https://www.dropbox.com/s/85nc52o241qobvm/snippet creator.alfredworkflow?dl=0

     

    Version 0.2:

    - updated to use a pipe | as a delimiter instead of a comma, and to remove the requirement to enclose text in quotes 

     

    Version 0.1:

     initial

     

     


  6. This is actually really nice - now that I'm used to Drafts on iOS where one starts with text and acts on it.  I had ignored the thread the first time round but I need to give this a try on a regular basis.

     

    What would it take to allow execution of keywords / list filters / script filters as well?  Ideally I'd like to set up a whitelist of a half dozen or so that I could use, leaving all other disabled.  Frequently I'll use searches to locate a book in libraries, for example, then run a workflow to download the citation and add it to BibDesk.


  7. 8 hours ago, deanishe said:

    The problem is that there are thousands and thousands of different types of documents.

     

    In order to print one, you need an application that can read your document to convert it into something a printer (driver) can understand.

    Just use a one line AppleScript

    tell application "Finder" to print selection

    this will print using whatever the system default app for the file type is.  Works fine for Pages for me.

     

    Or in an Alfred file action where Language is AppleScript and input is {query}:

    tell application "Finder" to print POSIX file "{query}"

     

×
×
  • Create New...