Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NewbieQ : Debugging



On 7/27/05 15:33, "Alex Husted" <email@hidden> wrote:

> In response to your question, I am sure that some simple tasks work quite
> well with folder actions. Perhaps I was a little to negative in my comment.
> My problems arose when I started creating complicated workflows for PDF
> files that involved using cURL and -lpr shell scripts as well as some
> Photoshop and finder work. The problem (I think) was that the folder actions
> were trying to work on files before previous actions/scripts were complete.
> So it would often deactivate the folder actions or hang the processes
> working behind the scenes. Using the Idle handlers instead allows me much
> more control over the timing and prioritizing of the former folder actions.
> If the folder actions are working for you then stick with it. I just wanted
> to point out an option that was not immediately apparent to me when I was
> pulling my hair out (what is left of it) over similar problems.

Using Folder Actions to do on - demand virus scans is not simple. There is
an issue with what causes the folder action to kick off, esp. with regard to
to adding items to a folder. (I can see reasons for this, so I'm not sure if
it's a bug or not) The solution was simply to have the folder action start
the script, but check, within the script, if the file was finished
copying/downloading. The FA works absolutely well as an initiator in this
case, and some basic size comparison tells me when the file's done, or close
enough to it, (in my case, there are a number of file transfer methods that
don't set the Finder busy flag, at least there were in 10.2)

Idle handlers just suck up CPU without giving you any real advantage in this
case. You just have to understand that one quirk of Folder Actions. (Hey
AppleScript Guy! Is the fact that the "adding items to a folder" action
starts well before the copy/move is complete a bug or a deliberate design
decision?)

-- 
John C. Welch         Writer/Analyst
Bynkii.com              Mac and other opinions
email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >Re: NewbieQ : Debugging (From: Alex Husted <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.