Re: Get Selected Finder Items behavior
Re: Get Selected Finder Items behavior
- Subject: Re: Get Selected Finder Items behavior
- From: Scott Haneda <email@hidden>
- Date: Mon, 2 Mar 2009 14:33:51 -0800
Thanks, is this why I am getting the duplicated? What if I wanted to
take some action on the dropped files, like setting their label, or
changing their names?
I am trying to understand the issue here so I can solve it in the
future if I need to.
On Mar 2, 2009, at 2:28 PM, Itai Rom wrote:
Scott,
If you're going to run this as a droplet, then you don't need to
start it with "Get Selected Finder Items." The files you drop on it
will automatically be input to your shell script action.
On Mar 2, 2009, at 2:21 PM, Scott Haneda wrote:
I am stumped on this one, first I thought it was an issue with "$@"
in shell scripts, but it appears not to be. Adding in a "Get
Selected Finder Items" and watching what it does when things are
dropped into it, will yield me a list of the items dropped.
When I try to interact with that list, the number of items in the
list are doubled when acted on, but in no way can I see where this
is happening. Here is my best case:
Create a new project
Add "Get Selected Finder Items"
Add "Run Shell Script"
Set pass input to argument
for f in "$@"
do
echo "$f" >> ~/Desktop/log.txt
done
Save as an application, drop a few files on it, the $@ variable
seems to contain 2x the items it should...
From my log
/Users/me/Desktop/test.txt
/Users/me/Desktop/untitled.txt
/Users/me/Desktop/untitled.txt
/Users/me/Desktop/test.txt
--
Scott
* If you contact me off list replace talklists@ with scott@ *
_______________________________________________
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
--
Scott
* If you contact me off list replace talklists@ with scott@ *
_______________________________________________
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