Re: Busy Status
Re: Busy Status
- Subject: Re: Busy Status
- From: JJ <email@hidden>
- Date: Sat, 02 Nov 2002 12:27:07 +0200
>
At 3:22 PM +0100 11/1/02, christian vick wrote:
>
>
>> I have a folder action that checks the busy status of files which are
>
>> in the process of being downloaded but the busy status doesn't appear
>
>> to be accurate. When checking the busy status of a file, with Finder
>
>> or "info for", what criteria is used to determine if a file is or is
>
>> not busy?
>
>
>
> Yes, busy status doesn't work (AS 1.9). In case of a download you may it
>
> workaround by comparing the file size every minute (or whatever the download
>
> timeout is).
>
>
Yeah, this is probably what I'll end up doing. I tried the handler
>
offered by Brian Geiger (thanks!) but it didn't produce the correct
>
result on a file that was being downloaded by Internet Explorer. What
>
a pain in the hiney.
>
>
Thanks to all who offered input and scripts. :-)
>
>
--
>
>
Rob Jorgensen
>
Ohio, USA
Hi, Rob, all.
Perhaps a try could be read/parse the "downloads" file. Actually, I don't
know where is it stored in os x, but at ancient times it was under os 9 at
(path to preferences folder) & "Explorer:Downloads.html".
I'm sure you know it: it's a html file containing:
<dt><a href="
http://file.sit" referer="
http://x.com" FolderID="30635"
volRef="-1" Size="1064531" Time="92" Status="-2">file.sit</a>
Being "Status" its actual status: "-2" equal to "finished".
I can't remember just now the codes, but anything such as 1=waiting,
0=downloading,-1=error and so on...
Or... a little tricky, but may work:
set file_to_check to (choose file)
tell application "Finder"
set x to icon of file_to_check
try
small one bit icon of x as text
on error e
set data_chunk to text from character 1 of e to character 35 of e
end try
-- when downloading an IE file, "Can't make +data ics#FF80D2FEA0E280"
-- this _start_ chunk is equal in every d/l IE icon
-- (testing here, OS 9.2.2, IE 5.1.6)
-- then, compare with the finished download (e.g. a "smi" file):
-- "Can't make +data ics#010002803FF028"
end tell
JJ
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.