Try this:
With timeout of 600 seconds --10 minutes
run script (alias "A.scpt")
end
Ed,
Thanks for the reply. Sorry about the double posting. Mail was acting up yesterday.
This isn't a timing issue. The error happens immediately after the file moves. Actually,
I put a with timeout block around it, but got the same error. I put a display dialog in
front of the move command, I got the first filename displayed, followed by the error.
Does anyone know why it only gives the error when run from another script?
What I think is happening is that the calling script is sending the run
script apple event and then waiting for a result. If it waits more than 2
minutes it generates a timeout error.
When the script is runs by itself ( not called from another script) none of
the apple events reaches the timeout limit, so it works. But when run from
another script, the total time to execute the run script command exceeds the
timeout limit and generates an error.
That said, if it's stalling at the first item in the list, there may be
something else in the script upstream of that which is adding execution
time.
HTH,
ES
The error happens immediately after the first file in the folder moves. No stalling,
If I run the pair again (script B calling script A) it moves the next file and stops with an error.
If I run script A standalone, all files move, with no error.
This was an attempt to not duplicate code, as script A does more than move these files,
its just that it's at this part of the script that I get the error. The first part of the script "A" builds
an email that sends all the files as attachments to a specific email address. That part of
the script works both as standalone and when called from the second script. Its just the
moving of the files part that fails.
Thanks again.
Jim