|
|
10.6: An AppleScript to compress a Finder selection
Nice idea about the script however the applescript code isn't clean so I cleaned it up for you. Here's some of the coding issues I saw...
1) you are telling the Finder to perform some tasks that its not needed for which is not a good idea because it can cause slowness and other problems 2) "the selection" is a list of selected items, so coercing to "alias" will not work if more than 1 item is selected 3) there is no error checking 4) a few other small things I hope this helps. ---Hank http://www.hamsoftengineering.com --- Hank http://www.hamsoftengineering.com Edited on Mar 04, '11 09:18:14AM by regulus
10.6: An AppleScript to compress a Finder selection
Regulus,
10.6: An AppleScript to compress a Finder selection
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
10.6: An AppleScript to compress a Finder selection
Darn, I misunderstood. I thought you intended your script to handle more than one file. My mistake. Thanks, though!
10.6: An AppleScript to compress a Finder selection
The original script handles several files. I dropped this part of the original code, but you could try to merge this code with mine
10.6: An AppleScript to compress a Finder selection
Nice improvment! |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|