MACSCRPT Archives

June 2013

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Emmett Gray <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 28 Jun 2013 22:22:52 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (16 lines)
On Fri, 28 Jun 2013 17:35:09 +1000, Richard Morton <[log in to unmask]> wrote:
>
>On 28/06/2013, at 4:32 PM, John Delacour <[log in to unmask]> wrote:
>> On 28/6/13 at 07:04, [log in to unmask] (Cal) wrote:
>> 
>>> Okay.  How do you use SetFile?  (I don't even know where to start with
>>> that.)
>> 
>> tell application "Terminal" to do script "man SetFile"
>
>There's no man page on my vanilla 10.8.4 system, so SetFile either doesn't have one, or still only comes with the xCode CL tools.

This is what kept my app "CopyDrop" out of the App Store. I found a serious bug in drag-and-drop Applescript applications since 10.6: if a folder has the Stationery flag set (a nonsensical setting, but one which I have run into _frequently_ in the real world, since 10.6), the folder will replicate itself in place with "copy" appended before the Applescript "open" code executes, and when it does execute, it will offer to operate on the copy. Oh boy. So for my application, I had to stick SetFile in the bundle so I could fix this, and I assumed that Apple would frown on this, so I didn't even submit it to the store because I didn't want to be told I couldn't do what I had to do even outside of the store. I'm violating some license but screw it; this bug (duly reported, years ago) will probably never get addressed, so what's a poor scripter guy to do? Including SetFile in my bundle is the only way I could figure out to offer a solution to buyers of my app. If someone knows another way to set the Stationery bit on a folder (the Finder won't do it because it doesn't recognize Stationery as an option for a folder), please tell me!

SetFile is only available with Developer Tools since Snow Leopard. (This Stationery problem didn't exist in Leopard).  Someone posted that they thought it's now in vanilla Mountain Lion. Apparently not. Bummer.

ATOM RSS1 RSS2