Re: perl script vs bash
Re: perl script vs bash
- Subject: Re: perl script vs bash
- From: Ron Hunsinger <email@hidden>
- Date: Mon, 28 Aug 2006 10:09:46 -0700
At 9:19 AM +0200 8/28/06, Sylvain Pascal wrote:
I finaly found a soluce to the problem thanks to your piece of
advice. But, there is another problem with the workflow:
i wanted to use the get selected files name action, and i found two
actions which does the same work but one make the process go wrong.
So i decided to use the second, and finally it runs!!
Do you know what the difference is? Or if it's a bug from automator?
We'd like to help, but you need to be more specific in your
questions. The only information we have about your problem is what
you tell us, so you have to make sure you tell us everything we need
to know.
I can't find ANY "get selected files name" action. Did you mean "Get
Selected Finder Items"? It's important to be accurate when phrasing
your question.
I can think of three reasons why you might be seeing multiple "get
selecte files name actions":
1) You see "Get Selected Finder Items" listed under "Action" when you
click on "Applications" in the "Library" column. And then you also
see it listed when you click on "Finder".
2) You see "Get Selected Address Book Items", "Get Selected Finder Items",
"Get Selected Font Book Items", "Get Selected iTunes Items", etc.
3) You see "Get Selected Finder Items" and "Get Specified Finder Items".
Those are three different issues, with three different answers. If
you're careless about the terms you use in your question, we don't
know which answer is the one you need. In this case, the answers are:
1) Each action is supplied by some one application. If you click on
an application in the "Library" column, the "Actions" column lists
only the actions provided by that application. This makes the list
shorter and easier to scan, but means you need to guess which app
provides the action you're looking for. If you click on "Applications",
the "Actions" column lists all actions provided by all applications.
But these are not different actions. It's just the same action,
appearing on two different lists.
2) Several applications provide a "Get Selected ... Items" action.
Which one you use depends on which application's selected items
you want to use.
3) Several applications provied a "Get Selected ... Items" action
AND a "Get Specified ... Items" action. Which one you use depends
on how you expect the workflow to be used. Specifically, it
depends on WHEN you determine which items the workflow is going
to operate on.
You use "Get Specified Finder Items" if you're going to choose
which Finder items to use at the time you create the workflow.
In this case, the workflow always operates on the same Finder
items each time it's run.
You use "Get Selected Finder Items" if the user chooses which
Finder Items to use at the time they run the workflow. In this
case, the user selects some items in Finder, then runs the workflow,
which operates on those selected items. The selection can be
different each time the workflow runs.
You also say "... but one makes the process go wrong." Again, you
need to be more specific. If you try something and it doesn't work,
you have to tell us:
a) What you tried,
b) What you expected to happen, and
c) What did happen.
Those are all important. In this case, we can sort of guess at (a)
and (b), but you've given us no clue about (c). We can't give you a
good answer unless you tell us all three.
For example, I can think of two likely answers, depending on what you
meant by "get selected file names action".
1) You tried "Get Selected Finder Items" from the "Applications" list,
and also tried "Get Selected Finder Items" from Finder's list.
These are both the same action, and must behave the same. But the
workflow could still behave differently if at the same time you changed
this step you also made a change to another step.
if (a) changed between the two trials.)
For example, the following step in your workflow is a "Run Shell Script"
action. That will behave differently depending on whether you've
selected to "Pass input: [to stdin]" or "Pass input: [as arguments]".
Only the one that matches how the script is written will work.
That is, you might have changed (a) (what you tried) in a way that
seemed innocuous at the time but really wasn't.
3) You tried "Get Selected Finder Items" and "Get Specified Finder Items".
Either could be correct, depending on (b) (what you expected to happen).
If you expected the workflow to compress whatever items the user has
currently selected, you need to use "Get Selected Finder Items". If
you expect it to always compress the same item(s), regardless of the
current selection, then you need to use "Get Specified Finder Items".
We can't tell you which to use unless you tell us (b). Again, we
can guess, but if we guess wrong then we're giving the wrong answer.
-Ron Hunsinger
_______________________________________________
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