Showing posts with label automator. Show all posts
Showing posts with label automator. Show all posts
2008-06-17
Run Ruby Script Automator Action
Jason Foreman published an Automator action that allows you to take advantage of Cocoa in Ruby scripts on his blog.
2005-05-17
Automator and shell scripts
So I was writing my first Automator workflow, and found a bug in the "Do shell script" action. I was trying to write a workflow to iterate over the selection in the finder (and any files in subfolders of the selected files) and use SetFile to change the type and creator. This seemed easy enough, except that it turns out when Automator converts a list of files to strings to hand off to the shell script action, it doesn't properly quote them.
Thanks to Mike Ashley from the Automator-users mailing list for the following code snippet that works around this:
Just put a "do applescript" stage ahead of the "do shell script" stage, and put the above code in. It'll take the list of file aliases and convert them to properly quoted paths for the shell script to act on.
Thanks to Mike Ashley from the Automator-users mailing list for the following code snippet that works around this:
on run {input, parameters}
set output to {}
repeat with i from 1 to length of input
set x to item i of input
set output to output & {quoted form of POSIX path of x}
end repeat
return output
end run
Just put a "do applescript" stage ahead of the "do shell script" stage, and put the above code in. It'll take the list of file aliases and convert them to properly quoted paths for the shell script to act on.
2005-05-15
Simple automator plugin to add spotlight tags
Adam Rice has a nice howto for creating an automator plugin to add spotlight tags to a file at http://www.adamrice.org/eponymous/2005/05/add_spotlight_t.html.
Subscribe to:
Posts (Atom)
Creative Commons License
This work is licensed under a Creative Commons License.
Copyright 2007, Joseph P. Block, Some Rights Reserved.
