Re: Folder Actions technical questions
Re: Folder Actions technical questions
- Subject: Re: Folder Actions technical questions
- From: "Adam Bell" <email@hidden>
- Date: Sun, 2 Apr 2006 15:07:44 -0300
Why do you get the folder name? You never use it, at least in this "wait for file" scriptlet.
On 4/2/06, John C. Welch <
email@hidden> wrote:
On 4/2/06 10:55, "Dave Balderstone" <
email@hidden> wrote:
> In the case of FA's, the moment I had problems (a particular set that
> rename files coming in from a RIP and then move them into a database
> gateway) I immediately went the stay-open app route, and went on to
> other things. I'd love to have time to get good at this stuff, but
> reality keeps intervening and my wife and kids like having a house,
> clothes, and food.
Oh I have a routine for that I wrote YEARS ago, I just plug it into things for FAs:
on
adding folder items to theFolder after receiving theAddedItems
tell application "Finder"
to set theFolderName to
name of theFolder
repeat with x in
theAddedItems
set theFileInfo to
info for x --get info for the downloading file(s)
set theBaseSize to
size of theFileInfo --get initial size
delay 3 --wait 3 seconds
set theFileInfo to
info for x --get info again
set theCompareSize to
size of theFileInfo --get a newer size
repeat while theCompareSize ≠ theBaseSize
--if they don't equal, loop until they do
set theBaseSize to theCompareSize
--new base size
delay 3 --wait three seconds
set theFileInfo to
info for x --get info
set theCompareSize to
size of theFileInfo --get a newer size
end repeat --once the sizes match, the download is done
end repeat
end adding folder items to
There's probably a better way to do it, but that works
--
"Microsoft is actually a secret Farengi-Klingon alliance designed to cripple the Federation. The Farengi are doing the marketing and the Klingons are writing the code."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (
--
Some minds remain open long enough for a truth to both enter and leave without processing.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden