Open handler sporadically misses calls

I have an applescript which acts as a helper application…its open handler is called as new items are processed and passed on from another application.
This is fine as long as the frequency of the calls is low. But it seems that if a call to the open handler comes too soon after the previous call, then the call is ignored.
Do applescripts ignore calls to their open handlers when they are busy? That is the only explanation I could come up with.

: I have an applescript which acts as a helper application…its
: open handler is called as new items are processed and passed
: on from another application.

: This is fine as long as the frequency of the calls is low. But it
: seems that if a call to the open handler comes too soon after
: the previous call, then the call is ignored.

: Do applescripts ignore calls to their open handlers when they are
: busy? That is the only explanation I could come up with.

AppleScript’s are single threaded and there’s no built-in queueing. I’ve implemented queueing by writing my requests to the end of a text file and having the script that processes the requests read the file and remove the top item. I set it up as a stay-open script. You have to provide coding for the situation where the file is busy when a script attempts to read it or write to it.
Marc K. Myers
Marc@AppleScriptsToGo.com
AppleScriptsToGo
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[2/9/02 3:56:51 PM]

I’ve implemented queueing by writing my requests to
: the end of a text file and having the script that processes
: the requests read the file and remove the top item. I set it
: up as a stay-open script. You have to provide coding for the
: situation where the file is busy when a script attempts to
: read it or write to it.

 Marc K. Myers <
:

Would it make sense as to pass commands, requests, parameters via Globals or properties instead of writing to text files…?

Eelco houwink

: I’ve implemented queueing by writing my requests to
: Would it make sense as to pass commands, requests, parameters via
: Globals or properties instead of writing to text files…?
: Eelco houwink

1.How would you do that?

2.How would that correct for the problem of no built-in queueing?

If you’re talking about using “run script” or “load script” I imagine it would do the trick. The only drawback I can see is it might take additional time to load and run over having a stay-open script processing transactions.
Marc K. Myers
Marc@AppleScriptsToGo.com
AppleScriptsToGo
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[02/13/2002 7:19:31 PM]