Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: An AppleScript to compress a Finder selection' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: An AppleScript to compress a Finder selection
Authored by: osxpounder on Mar 04, '11 03:11:57PM

Regulus,

Nice of you to try improving this script, but I'm not sure it works properly yet.

When I try to invoke it with Butler, I get a dialog box from Butler with an error, telling me, "Error: Please select only one Finder item before running this script."

I paste your script into a Butler "Smart Item: Applescript." I select several files in Finder. I invoke the Butler item with my chosen abbreviation, "zipem" and see the error dialog box.

I also tried saving your script as an app, and invoking that with Butler, when several files are selected in Finder. I get the same error ("Please select only one file...").

Is there a better way to invoke your script using Butler? How are you doing it?



[ Reply to This | # ]
10.6: An AppleScript to compress a Finder selection
Authored by: regulus on Mar 04, '11 03:22:20PM
I didn't write the basic script code, I just improved it. The author's script only works when you select one file, thus my script works the same. The code can probably be improved to allow more than one item selected. So your problem seems to be that you're selecting several items in the Finder window... that's why I put error handling into the code... the error is telling you the problem... try it on just one item.
---
Hank
http://www.hamsoftengineering.com
Edited on Mar 04, '11 03:25:30PM by regulus


[ Reply to This | # ]
10.6: An AppleScript to compress a Finder selection
Authored by: osxpounder on Mar 04, '11 09:22:13PM

Darn, I misunderstood. I thought you intended your script to handle more than one file. My mistake. Thanks, though!

I found that an Automator action can handle more than one file, but since it strips some metadata, I think I'll stick with using the right-click contextual menu in OS X instead.



[ Reply to This | # ]
10.6: An AppleScript to compress a Finder selection
Authored by: prijker on Mar 05, '11 03:03:56AM

The original script handles several files. I dropped this part of the original code, but you could try to merge this code with mine



[ Reply to This | # ]