making a script wait until a task finishes before proceeding
making a script wait until a task finishes before proceeding
- Subject: making a script wait until a task finishes before proceeding
- From: Matt Hoyle <email@hidden>
- Date: Mon, 12 Aug 2002 19:15:55 -0400
I know that I should be able to figure this out, but I'm having a hard time.
I've written a simple backup script for use on my PowerBook. It uses
DropStuff to stuff a group of aliases in a folder and then renames
the archive with a name of the form "MM_DD_YYYY.sit".
That part of the script works ok, but I have some other statements
after that section which I want to run ONLY after DropStuff finishes.
I am currently unable to get the script to wait until the archiving
completes before proceeding.
Here's a snippet:
tell application "Finder"
activate
--
with timeout of 600 seconds
--compress folder of aliases using DropStuff
select folder . . .
set editorApp to application file id "DStf"
open selection using editorApp
end timeout
--tell script to wait for 10 minutes while DropStuff creates archive
--tell me to sleep for 600
--this line creates date string of form MM_DD_YYYY
set the_date_slug to my format_date_using(the current date,
"_", {"MM", "DD", "YYYY"})
--now rename backup archive with label of that form
select item . . .
set name of selection to the_date_slug & ".sea"
end tell
(other statements)
Can anyone shed some light on this for me? Here's my environment:
OS: 9.2.2
AppleScript: 1.8.3
Carbon: 1.6.0
Thanks in advance,
Matt Hoyle
_______________________________________________
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.