jomaweb Posted April 6, 2013 Share Posted April 6, 2013 (edited) Hi all Many of the apps I use are java or bash script apps, most of them them depend on a bash script to initiate. Usually I make a workflow with "keyword to script" template but i'm guessing if there is a simpler method to do it. I suppose Alfred scans App folder and let me fire any app (or script) found there but when I write the script name (even with .sh extension) or the full path to script, it opens in editor. Using ">" to force it open in terminal gives me a "Short-Lived Session Warning" and terminal closes. Surely I'm mistaken, but wich is the best an simplest method to launch a bash script from Alfred that resides on App folder? thanks Edited April 6, 2013 by jomaweb Link to comment
Subject22 Posted April 7, 2013 Share Posted April 7, 2013 (edited) If I understand you correctly you want to be able to open Alfred, type the name of a script (which is located somewhere on your computer), and hit enter and have Alfred run the script. Is that right? Here is a workflow that uses a file filter to search only certain file types (currently it'll only accept .py, .sh and .scpt, but it's easy to modify) in a certain search scope (currently ~/Desktop, but again, that's easily modified). To use it you type "script" and then search for the script that you want to run. When you hit enter the chosen script is passed through to a shell script which runs it (in theory ). This is just to get you started, and won't do everything you require. For example, it currently attempts to run any script passed to it with Python, Bash and osascript, so you'd need to add some if statements to make sure the right script gets run with the right language :-) I'm fairly new to all this myself, so excuse me if I've misunderstood something. That's my best guess, anyway Edited April 7, 2013 by Subject22 Link to comment
jomaweb Posted April 7, 2013 Author Share Posted April 7, 2013 you're right Subject22, that's the point. I wnatr to open Alfred, type the name of a script, and watch as the script is executed. thanks Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now