Jump to content

davidzumini

Member
  • Posts

    9
  • Joined

  • Last visited

Posts posted by davidzumini

  1. @frankspin -

     

    I've recently discovered that the Slack URL scheme appears to be working on the Mac. Basically, slack://channel?id={CHANNEL-ID or IM-ID}&team={TEAM-ID} will open the Slack app in the channel selected. I'm wondering if there's a way to modify Slackfred to take advantage of this versus the script that triggers the Quick Switcher? I took a look into the code, but it's a bit beyond what I understand.

    In a nutshell, what I'd love to do is type "slk" into Alfred to search for users or channels. Once I select one, I'll need to pass the Channel ID or IM ID (note: the URL scheme needs the IM ID that's tied to the user, not the User ID, in order to work for chatting with individual users - https://api.slack.com/methods/im.list/test)into the URL. 

     

    Any thoughts? Thanks!

  2. First off, great work on Remote - I'm enjoying discovering ways to add value to my workflows already!

     

    Having played around with it a bit, 3 things came to mind that would be amazing to have (and perhaps you have plans for these already...):

    1. Send text from the iOS clipboard to the Mac via a workflow. Not only would this be a great way to get text from iOS to Mac, but it could open up some cool possibilities for manipulating said text or inserting it into workflows on the Mac.
    2. Implement support for URL schemes. Being able to fire off a workflow via Remote as part of a Launch Center Pro or Workflow action could open up a lot of possibilities too.
    3. Send commands to iOS from Alfred for Mac. Again, taking advantage of URL schemes and such, it would be great to be able to pop open Alfred on my Mac, type in a command, and have it pop up on my iOS device (see how Command-C does this, for example). This could be as simple as sending text from Mac to iOS or launching an iOS app, or it could be more complex, like triggering an action in LCP or Workflow.

    Anyways, just a few things to think about - and like I said, maybe you already are! In the meantime, keep up the awesome work. Alfred is easily one of my must-have Mac apps.

  3. Ha, yeah. Sorry, I was working off an existing Workflow I have using Applescript.

     

    By the way, I reached out to Slack to find out if they support URL Schemes for their desktop client. If they do I can probably throw something together for you.

     

    Awesome - that script works much more efficiently than my original one. It's a decent solution for now, but I appreciate you reaching out to Slack too. I also sent them a message, but didn't think to ask about URL schemes. I'd love to know what you find out from them. Thanks again!

  4.  

    I think you can simplify this a bit:

    on alfred_script(q)
    tell application "Slack" to activate
    tell application "System Events"
    	keystroke "k" using {command down}
    	tell process "Airmail" to keystroke (q as string)
    end tell
    end alfred_script
    

     

    Thanks - Though I'm guessing the 3rd line from the bottom shouldn't be "tell process "Airmail" to...". Should that be "Slack" instead?

  5. As I said, based on the API documentations I'm not sure if the methods for interacting with rooms and people will join them or just simply display who they are. Additionally this likely interact with the website and may require some extra work to have it interact with the desktop application. Actually I'm fairly confident it will only interact with the website. So in the end you will still need to use Apple script to trigger interactions with the desktop client.

     

    Maybe someone can prove me wrong here but based on the API and the way other workflows work (like David's Rdio one) the situation you want wont be any fast or better than what you're using now.

     

    I appreciate the more detailed insight. As I mentioned before, the API is a bit beyond my current desktop coding skills, so your comments above are helpful - thank you!

     

    Remember that Slack is in very active development, so those of you who have a clear idea of what you'd like to achieve with Slack's API could drop them a line with an explanation of what you're trying to do so that they can be made aware of what their users want. They're nice people so I'm sure they'll be interested in hearing your views (regardless of whether or not the additions to the API are possible).

     

    A very good point - perhaps I'll reach out to their team and see what they have to say. Thanks for the idea!

     

    And, for what it's worth, here's the script I am currently using - patched together by my basic understanding of Applescript and a few Google searches. If anyone has any recommendations for improving it, I'd love to hear them. Thank you!

     

    tell application "Finder"
    activate
    set the clipboard to "{query}"
    end tell
    
    tell application "Slack"
    activate
    
    tell application "System Events"
    	keystroke "k" using {command down}
    	keystroke "v" using {command down}
    	keystroke space
    end tell
    
    end tell
  6. I don’t use the app, so I won’t be of much help building it, but I suggest you post your workflow here, anyway. You’ll get more answers showing what you have and asking for help, than simply asking to have it done.

     

    My workflow is a poorly written Applescript that basically calls the app to the front and pastes in the query from Alfred. :) It doesn't always work, but it's not exactly what I'm hoping to accomplish. What frankspin says below is more along the lines of what I mean... Appreciate the comment though. What I've done is on my work machine, so I'll have to post what I have, for what it's worth, tomorrow.

     

    So are you looking to full replicate the way this works in Alfred? IE you launch Alfred, type Slack and it shows you all the users and rooms which you can filter? Looking throughe the API it appears you can list the people and groups but only join a group. Not sure if that means switching to the channel though. https://api.slack.com/methods

     

    Basically, yes - I want to type "Slack Something" to see a list of users and people that match "Something". Selecting one and hitting enter would ideally launch the Slack app in said view. I looked through the API too, but APIs are a bit beyond my understanding at this time. I did find this: https://github.com/tylerhall/AlfredSlackSearch which is close, but not quite what I want. It makes me think it might be feasible, though. 

     

    I'm hoping someone either knows of a workflow that does the above, or could maybe school me a bit on how to build something myself via the API - though I realize that may be asking too much as I don't really understand the scope of the work I'm trying to find/do!

  7. We just started using the Slack app at work. I love the quick "command + t" keyboard shortcut in the app to switch between users/channels. I was wondering if anyone had developed an Alfred workflow to emulate that function right from Alfred using Slack's API?

     

    I've created a rather simplistic version of this using Applescript, which sort-of works, but it's not ideal and I'm sure it could be done more efficiently.

×
×
  • Create New...