Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by ebarrere

  1. I honestly don't remember. It's probably something I saw somewhere and copied, or maybe I was messing with it while testing? It's been a while You are recommending double-quotes surrounding {query} and unchecking Spaces, Brackets and Semicolons from both the Script Filter and Run Script setups instead? Yeah, I wish I'd thought of this last time it was happening, but I plan to next time I see it Good point; I wrote that in like 10 minutes last night Thanks for catching it; I've updated to use a HEREDOC instead. Ah, yeah. That's something I was playing with to control Philips Hue devices. I don't think there's any code actually in use in there, but I should comment out the "require" for consistency.
  2. Thanks guys. I've posted a screenshot of my Run Script config here, but again it never seems to get to that point. Next time the issue occurs I'll add some echo statements to the top of the bash script and see if I get any output. The code is in my GitHub repo if you'd like to review.
  3. So after some more investigation I think this may be related to a timeout somewhere. Does Alfred have a timeout for Run Script commands to complete, after which it silently fails (remember, no output from Run Script whatsoever)?
  4. Hi there - I'm not sure this is the right place for this, since I'm not 100% certain it's a bug in Alfred itself (could be the Ruby framework I'm using, but it doesn't seem like it). Anyway, hopefully someone can point me in the right direction. I have written a workflow with the Ruby Alfred workflow framework here. The workflow uses a Script Filter to generate a list of objects from my home automation device, which I can then action to perform commands against. The problem is that sometimes the workflow doesn't seem to trigger the "Run Script" action. I've verified this by watching the Alfred workflow debug output: [INFO: alfred.workflow.input.scriptfilter] <items><item autocomplete='Stereo - Volume Up 5:' valid='yes'><title>Stereo - Volume Up 5</title><arg>Stereo - Volume Up 5:53078:0:</arg><subtitle>address: 53078</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - Volume Down 5:' valid='yes'><title>Stereo - Volume Down 5</title><arg>Stereo - Volume Down 5:57003:0:</arg><subtitle>address: 57003</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - Power:' valid='yes'><title>Stereo - Power</title><arg>Stereo - Power:37005:0:</arg><subtitle>address: 37005</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - Line In:' valid='yes'><title>Stereo - Line In</title><arg>Stereo - Line In:54836:0:</arg><subtitle>address: 54836</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - KPLU:' valid='yes'><title>Stereo - KPLU</title><arg>Stereo - KPLU:32963:0:</arg><subtitle>address: 32963</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - KEXP:' valid='yes'><title>Stereo - KEXP</title><arg>Stereo - KEXP:39911:0:</arg><subtitle>address: 39911</subtitle><icon>icon.png</icon></item></items> [INFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg 'Stereo - KEXP:39911:0:' Note that the last INFO line is "processing output", but there is nothing from the Run Script whatsoever. I've even added gibberish to the very beginning of my Run Script and it never displays any errors, so it really seems it's just not being run. Anyone have ideas for what to look at here, or how to enable even more verbose logging from Alfred workflows? *UPDATE*: I neglected to mention I'm running the latest Alfred (v2.8 (414)) w/Powerpack on Yosemite 10.10.5 Cheers - elliott
  5. Hey guys - I've "written" a workflow to attach a file to the frontmost email in Mac Mail. This is really nice if you want to attach a file to an email reply, for instance, rather than creating a new email with the file as an attachment. (I say "written" because it was actually adapted from an AppleScript I found somewhere on the internet long ago. Unfortunately it's been so long I honestly can't give credit.) Anyway, here's the workflow. You'll need to have an email "open" and ready to send in Mac Mail, with the "focus" on the email body section. The workflow will jump to the bottom of the email body (below any quoted text) and paste the file to the very end.
  6. Nice! I searched the web when I originally wrote the tool but couldn't find anything, and this was pretty simple to write. I also liked the idea of having a cached copy locally, but ideally my workflow would generate that, and I don't have immediate plans to update it Your workflow has much more functionality though! I'll switch to it if you add my feature
  7. If you use Jira a lot you might like this workflow. You can search users by first or last name, and when you find the one you want, action them to paste their username (in [~username] format) to the frontmost application (you can hold Cmd to copy to the clipboard). Useful if you like to use @mentions in email! Find the workflow and README (with setup instructions) on GitHub.
  8. Nice. I almost wrote one of these today, but you did it for me Cheers.
  9. Hi there - I've written a quick workflow to do a few network-related things I do regularly, namely lookup MAC addresses in an online vendor database, and get network information about a subnet. The repository can be cloned directly from GitHub (please find the README there as well). Note that the subnet script relies on the ipcalc utility, which can be downloaded here, or through Homebrew. Hope it helps somebody! Cheers - ebarrere
  10. It probably doesn't support .rdp files, unfortunately. If you can find a way to launch an RDP connection from the command line I can update the script to support it, but that is all I can recommend. Good luck!
  11. Hey there - I've used iTap RDP for a while now and have been annoyed with the inability to do a "quick connect" session like CoRD and most other RDP apps. So I've written a quick little Alfred workflow to open an RDP session from a temp file (I can't believe I didn't think of this before!) The workflow has been (lightly) tested with both iTap RDP and the newly-released Microsoft Remote Desktop app (free from the App Store), but should work with any other app that can read a .rdp file. Usage: Type rdp <hostname/IP>[:port] (port defaults to 3389) Enter will open an RDP session to the host using the default system application (can be set using APP variable in script) Provide a "short hostname" (non-FQDN hostname) to auto-append the search suffix from /etc/resolv.conf Download direct at GitHub. Enjoy!
  12. Hi there - I have a script filter written in ruby (using the very nice Alfred Ruby Template) which queries my home-automation system for a list of devices, or "nodes". I can then action a node, which passes the address to a script that turns the node on or off. I would now like to extend this functionality to allow passing a numeric value so the script could, for example, set a light to a specific brightness level, instead of just on or off. Is this possible with the script filter syntax? Is there a way to "terminate" the script filter search to say "everything after this point is an argument rather than a search term"? Perhaps some other way entirely of accomplishing this? It occurred to me that maybe there's a "context menu" for script filter items, similar to a the File Action menu, but I can't seem to find it. Cheers for any help!
  13. Aha, got it! Apparently elinks wasn't in Alfred's PATH variable. I just added the full path to the elinks executable and it works now. It looks like Alfred doesn't read my .bash_login file, probably because it's not a login shell Anyway, I can poke around and put the PATH variables elsewhere. Thanks for helping lead me to the solution!
  14. Thanks for the suggestions. I've changed the script to look like this: IP=$(cut -d " " -f1 <(echo "{query}")) NETMASK=$(cut -d " " -f2 <(echo "{query}")) RETURN=$(elinks -dump "http://jodies.de/ipcalc?host=${IP}&mask1=${NETMASK}&mask2=" | awk '/^Address:/,/^Hosts/') echo ${RETURN} but nothing has changed. I've also added {query} to both the "Title" and "Text" sections of the Post Notification action, but still nothing.
  15. Sure, here's a link to the exported workflow.
  16. Good idea, but parsing the variables that way also doesn't work -- still nothing at all in Notification Center.
  17. Good thought, but I have tried it checked and unchecked in version 1 and 2.
  18. Hey all - I'm trying to pass two arguments to a shell script in Alfred (I've tried both v2 and v1) and I can't seem to get any output. The script works fine when run through the terminal, or when "silent" is unchecked in version 1, but there is no output to the Notification Center. I've read the article here, and tried using read to parse the {query} string, but to no avail. Here is the full script, fwiw: read IP NETMASK <<< "{query}" elinks -dump "http://jodies.de/ipcalc?host=${IP}&mask1=${NETMASK}&mask2=" | awk '/^Address:/,/^Hosts/' Any ideas?
  • Create New...