Re: With timeout of
Re: With timeout of
- Subject: Re: With timeout of
- From: Richard 23 <email@hidden>
- Date: Sat, 9 Dec 2000 07:22:30 -0800
PREFACE:
If this response misses the point entirely I apologize. The word
"timeout" got me all fired up. What I'm addressing has been asked
about on the list beforek, so somebody should find it useful.
So anyway, email@hidden mentioned:
>
my script keeps timing out. I need it to be used, and then open another app
>
and wait till user is finished to select another app to open and so on. i
>
have a with timeout of 100000 seconds which is over a day. after a minute it
>
times out, and when i click edit it highlights the line in my on error. I
>
think it may have to do with the tell me's, but i need the dialogs to be in
>
the script's app. here it is, shortened:
on
return [something]
end
ok I shortened it even more. There was a lot of busywork going on in
there
that didn't seem necessary for a possible solution.
I bet just about everyone who runs scripts using osa menu or by calling a
helper applet has run into the frustrating and seemingly causeless hurry
up
and wait that occurs all too frequently. Well maybe not often enough to
get
a clue as to the problem's source, but the 30 seconds...minute...whatever
seems like an eternity while your script does nothing but wait for the
timeout while you stare blankly at an unresponsive OS which is about as
interesting as watching paint dry. The second hand on one's watch almost
seems to tick backwards.... then finally the timeout and you're left
wondering why and without the result you requested about two minutes ago.
I searched my digests a couple of weeks ago and found reports of this but
didn't notice any difinitive solutions.
A little while ago Anthony Adachi quietly posted what appears to be the
answer. He's probably still wondering if anybody read it because there
wasn't much response. But the implication I got was that in the absense
of an EXPLICIT return statement, even just "return result", the callee
doesn't seem to return anything with any amount of gusto and the caller
just waits and waits and finally times out.
So I added some explicit return statements to my externally called
handlers
(adding return by itself if no result was to be returned) and the
preliminary
result was a major improvement. The "do nothing slowly" tendency of some
scripts in my osa menu has made me a little gunshy, digging through
folders
rather than calling it from the menu. The waiting game appears to be over
thanks to Anthony Adachi.
I'll be applying this to my some of my site's scripts soon, notably
Open SA (Scripting Addition) Dictionary as I recall it suffereing from
occasional terminal timeout syndrome.
R23
hasn'
It seems to have a cascading
effect
screen presented with an unresponsive
mac