Jump to content

GuiB

Member
  • Content Count

    272
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by GuiB


  1. @Twice Bitten, since you are not mentioning which Terminal application you are using, I guess you use Terminal.app. So, to "pass the text into the current Temrinal session window" and keeping your default Terminal integration as it is in Alfred (so you can keep your other action to open a new Terminal Session if you want), you can create a workflow that pass your text to a Run Script object with the script language set to /usr/bin/osascript (AS) and with the script set to:

     

    on run argv
      tell application "Terminal"
        activate -- comment this line if you don't want to send the Terminal window to front
        do script (item 1 of argv) in tab 1 of window 1
      end tell
    end run

    or if you want to change Alfred's Terminal integration as mentioned by @vitor and use , you can set Alfred to use a Custom terminal application and set the script to :

     

    on alfred_script(q)
      tell application "Terminal"
        activate -- comment this line if you don't want to send the Terminal window to front
        do script q in tab 1 of window 1
      end tell
    end alfred_script

     


  2. 6 hours ago, deanishe said:

    There’s a bleep-bloop?

     

    Huh. I guess I must be blocking that without knowing.

     

    There's a preference to disable the sound in the Notification Settings at: The Bell Icon (top right corner) -> Notifications Settings -> Notification preferences -> Play a sound when I receive a notification

     

    @dfay , could this help to uncheck this?


  3. If I get what you want to do, here is an updated workflow: https://d.pr/f/Qy36hV

     

    In short, you don't need to use the Hotkey object to get the clipboard content or to pop Alfred, but use it simply to launch your workflow. Then, you connect a keyword object to get an Alfred field to write your query and then you append this query + clipboard to your file (the clipboard accessed using the Alfred's clipboard content variable)

     

    Hope this helps!


  4. 2 hours ago, deanishe said:

    You want a File Filter, which you can then connect to a Terminal Command with the command cd "{query}".

     

    As @deanishe says, but to simplify the 'connect to a Terminal Command with the command cd "{query}" ', actually with Hyper you can simply do an "open this folder with this application" where "this application" will be Hyper.

     

    I mean, to build it yourself, just do:

    1. Go inside your Alfred's Preferences at your Workflows tab
    2. Press the [+] button at the bottom of your Workflow list and select: Examples -> Simple Folder Search
    3. Double click the File Filter object and change the keyword to: >find
    4. Click the Save button to save your preferred keyword
    5. Double click the Open File object and drag-and-drop your Hyper.app application into the right drop target (where it says: the default application)
    6. Click the Save button to save your object

    Then, you should be able to invoke >find myproject

     

    With this you don't even have to change the custom terminal in Alfred and add my script, but if you plan on using Hyper I think it would be useful if you want to invoke Hyper using the Open Terminal Here or other Terminal object of Alfred.


  5. You should be able to use Hyper by using my script that you can find in the attached post. You will need to set Alfred to use a custom terminal (Alfred Preferences -> Features -> Terminal) and paste my script in the bottom text area. Then you should be able to use the Open Terminal Here action from Alfred when inside the File Action menu 

     

     


  6. 6 hours ago, ssppjj said:

    I wish Enter key closes the form though. It bums me that I have to click on the button to close this form every time.

     

    Just press CMD+S again and it should save it.

     

    I mean:

    1) CMD+S from the Snippet History to pop the Snippet window

    2) CMD+S from the Snippet Window to save the Snippet (which does the same as pressing the Save button)


  7. 1 hour ago, Appu Mohan said:

    Any way to set spark for this (http://www.packal.org/workflow/mailapp-search) work flow ? 

     

    This is a different problem. This is a workflow that is simply a file scanner that is set to scan a specific kind of files in a specific directory ( ~/Library/Mail ). This is a specific configuration that work with Apple Mail since Mail put its email database inside a folder hierarchy composed of .emlx files which can be directly accessed by Finder.

     

    Spark uses a different database composed of SQLite files. Therefore, the workflow you are linking (or a modified version) can't be used with Spark and you would need to create a new one that can interface with the SQLite database. If you want to go this route and create your own workflow, you can have a look and find Spark's data folder here: ~/Library/Group Containers/3L68KQB4HG.group.com.readdle.smartemail


  8. @Appu Mohan, some time ago I did a plugin for Spark to work with Alfred. You can have a look at the attached discussion link for the download file and how to install it. But in short, download the applescript file here and drop it into your folder at `~/Library/Application Support/Alfred/Plugins/Email/Spark.applescript`

     

    Hope this helps!

     

     


  9. @Andrew, great addition, thanks! Just played a bit with it and this will be useful, but I was wondering if it would be possible to make it so it filters the list or the Up/Down arrows jump between fields that match the query?

     

    For example, if I have a Work Phone Number + a Work Address, I could type "work" and use the arrows to jump between those fields.


  10. Also, if you need to change field between different outputs, you can add a "Dispatch Key Combo" key object to insert a TAB or ENTER or anything else (like to CMD+V that I use inside the workflow to paste the image) that you would normally do in-between you different expansions


  11. @Matty and @egmweb, sorry I wanted to send it to you sooner, but I'm quite busy at the moment, but here is a workflow as example that I have uploaded some of those tips many months ago. The RTF example inside it is not useful anymore with Alfred 4, but you can have a look at the Expand Image example and the RTFD example. In short, you need to create a file with the content that you want for expansion and use it has the file path for the script inside that is connected after the Snippet Trigger. Just copy and paste the one that is useful to you into a new workflow and change the file path + the Snippet expansion keyword and you should be good.

     

    Example Workflow: https://d.pr/f/PCcxuP

     

    Best


  12. Not exactly a single key, but you can assign a "double tap" from a modifier key. For example: Option+Option

     

    If you want a single key, you would need another application that can customize your key configuration from a lower level like Karabiner Element. I'm not using it since I didn't think of any tricks that I would use from it (yet), but I think this should make it possible for you to do what you want.

     

    However, just my 2 cents, honestly I don't know why I would assign my Option key to limit it to only pop Alfred since, as much as I love Alfred, my Option key is pretty useful to insert symbols. So I would be more inclined to use the Double Tap instead of going the Karabiner route. But you can try both and see what you prefer. Or, as an idea, you could set only your right (or left) Option key to pop Alfred so you have your other Option key to work normally

     

    Best!


  13. Make sure that your have checked/set those items:

    • Do you have "[ ] Automatically expand snippets by keyword" checked? (This is your Master checkbox to activate the auto-expansion of your snippet in Alfred)
    • Do you have the box under the column "A->" of your snippet checked? (This is the checkbox to activate a specific snippet for auto-expansion)
    • Did you set a Keyword for you snippet? (This is what you need to type to activate the auto-expansion of your snippet)

  14. From my tests the bug is not because the keyword object is activated externally, but because it has an empty 'Title' or 'Subtext'. Your "{var:empty}" get changed to an empty string, so it does the same. For now, just replacing your '{var:empty}" to any string (but only spaces since Alfred strip them) will repair your workflow.

     

    So, the problem is "Getting" into a keyword object that has no Title or Subtext defined. I mean arriving to the keyword from another object won't work, but invoking it directly using it's keyword work.


  15. @deanishe, yes, it wasn't clear if it was possible to retreive the contact information from the api, so I gave an alternative if @Dreamisdead could only get the name of the contact and have the contact information from is own Address Book database... But yes, if everything is inside your API, then yes it shouldn't be too difficult to write a script filter to extract the full contact information from the API.

     

    Also, a little tip, if you want to access the email or phone or something directly from your first Script Filter, you can make use of your modifier keys to access them directly. For example: CMD+Enter to get the email address and put it in your clipboard directly or opening a new email with this address directly... it's up to you!

     

    Happy coding! :)


  16. I don't know if I get it right, but if you want to search for a contact and get the output like the default contact search of Alfred, then you can search your address book database using a File Filter based on your contact name that you get from your first script filter and send the found contact to open in Alfred (if Alfred is set to "Open Contacts in Alfred").

     

    What I mean is:

    [Your Script Filter] -> {query is now your contact name} -> [The File Filter that gives you a list of matches] -> [Open the match in Alfred]

     

    Here is an example: https://d.pr/f/yIPU1v

     

    Just change the "ys" keyword object to your Script Filter

     

    If you Employee name is always the first in the list then you can rapidly press a second Enter to go directly to the Alfred Contact Viewer (or automate this second Enter key press)

     

    It could be done by using a second Script Filter, but if you want to access your contacts database directly then I think using the File Filter could be an easy way

     

    To give credits, my File Filter that search the Address Book database is a modified version of @Vero workflow that you can find here: 

     

×
×
  • Create New...