multiple files sent to "run shell script"
multiple files sent to "run shell script"
- Subject: multiple files sent to "run shell script"
- From: Jean-Christophe Helary <email@hidden>
- Date: Mon, 1 Dec 2008 09:03:13 +0900
I have a trivial workflow that selects a file and sends its path to a
shell command that itself calls an OpenOffice macro.
I'm trying 2 versions of it.
The fist is an app that would get finder items and pass them to the
script, the second is an Automator contextual menu that gets the
selected file and passes it to the script.
The script goes like this:
/Users/suzume/Applications/office/OpenOffice.org.app/Contents/program/
soffice -invisible "macro:///Standard.Module1.SaveAsOOO("$@")"
There are a number of issues here, none really related to Automator
but I was thinking a workaround could be implemented on this side of
the flow since I am not too familiar with OOo macros.
1) When the $@ parameter contains multiple paths, the macro does not
work. Because the macro asks for a single file and can't handle
multiple paths.
So I am thinking about a way to split the path list given by Automator
into as many paths and to run a loop on the script as long as there
are paths.
Is there a relatively simple way to do that ?
2) The macro seems to have a problem with spaces or "exotic"
characters in paths. It seems to split the path somewhere and we are
back to issue 1) above. Is there a way to forcibly pass a path so that
it can not be considered as multiple paths ?
Jean-Christophe Helary
------------------------------------
http://mac4translators.blogspot.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden