sivabudh Posted January 21, 2014 Posted January 21, 2014 Hello, I'm trying to create a workflow that does image processing to selected images in Finder. For some reason, when the script runs, it would stop executing after the first "exec" is called (e.g. when I call the "convert" command). Here's what my Alfred workflow looks like: http://goo.gl/45BiWd and here's what my Ruby script looks like: http://goo.gl/Fo7ssF I'm sorry. I have spent many hours trying to figure out why it stops after the first image is processed (resized and alpha removed). Does anyone know what the cause could be?
deanishe Posted February 6, 2014 Posted February 6, 2014 Did you figure this out? As best I can tell, Alfred would only send one filepath to the script.
raguay.customct Posted February 6, 2014 Posted February 6, 2014 This article will explain it for you: http://rubyquicktips.com/post/5862861056/execute-shell-commands Basically, Exec exits ruby to run the command. Therefore, if you are in the middle of a loop, you loop will suddenly be exited. The better way is to use backticks `. The article explains it. Sorry, I just saw this post today. Otherwise, I would of spoken up sooner.
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