Controlling workflow (Was: Script not waiting for completion of Eudora task)
Controlling workflow (Was: Script not waiting for completion of Eudora task)
- Subject: Controlling workflow (Was: Script not waiting for completion of Eudora task)
- From: Max Bonilla <email@hidden>
- Date: Mon, 4 Dec 2000 15:25:38 -0600
Yes, but I still think that sometimes my scripts are not structured
correctly to maintain the workflow as I would want (I keep blaming my
ignorance).
This phenomenon happens in various scripts I have. Here's one
example. I have a script with which I would like to backup my Newton
PDA and after that happens to start a synchronization of the date
application. The programs involved are two, Newton Connection
Utilities and ClockWork. Once AS sends the command to NCU to start
the backup, NCU begins a process that normally takes a few minutes.
The script instantly moves to the next process, the synchronization.
It never waits for NCU to finish the backup. Should AS wait for
signal from NCU?
Max
Under normal circumstances, when AppleScript tells an application to do
something, the application performs the task and then signals
AppleScript that the task has been completed. AppleScript waits for
that reply before continuing on with the script. There is no mechanism
for "AppleScript assumes it has been done and moves on". Unless the
"tell" is bracketed by "ignoring...end ignoring", the script waits until
the application reports back that the task is done. When I said that
Eudora was returning a false indicator, I meant that it was telling
AppleScript that it was done with its task when that was not the case.
Otherwise, the script would not have moved on to the next command.
There is, AFAIK, no way for you to "have not told AS what to do
correctly" that would cause this to happen.
Marc [12/4/00 1:03:23 PM]