Re: Time Delay with AppleScript
Re: Time Delay with AppleScript
- Subject: Re: Time Delay with AppleScript
- From: Doug McNutt <email@hidden>
- Date: Thu, 17 May 2001 09:04:08 -0600
>
I need to have my script pause while an application executes some batch
>
commands on files. After the batch commands are complete. . .
This piece is getting files from Netscape (URL Access doesn't handle 128 bit encryption). It does some delays and looks at the files being downloaded to see if they are long enough to have been finished. Note that Netscape does not return result codes so I can't wait that way.
I think it might help.
on process(aURL, aFile)
try
tell application "Finder"
delete file aFile
end tell
end try
tell application "Netscape Communicator"
activate
GetURL aURL to aFile
end tell
set waiter to 100
repeat while waiter > 0
try
tell application "Finder"
set countchar to size of item aFile as integer
log countchar
if countchar > 100 then
set waiter to 0
else
set waiter to waiter - 1
delay 5
end if
end tell
on error
set waiter to waiter - 1
delay 5
end try
end repeat
end process
--
-> From the U S of A, the only socialist country that refuses to admit it. <-