dbAccess: wait for a key pressed

C

camelot

Guest
Hi All,
I have a code like this in dbAccess mode:

while(flag == nil

if(//SPACE bar is pressed// then flag = t)
; do some operations....
)

How could I implement: //SPACE bar is pressed// check?

Camelot

p.s. bindkeys are not available in dbAccess mode.
 
I would be very surprised if there is access to the keyboard in
dbAccess. However, since
you have the SKILL language primitives available you can call
functions like read available.
Do you really want to know whether the space bar is still pressed and
not yet released?
or do you want to know whether the space bar has been pressed at some
point in the past?
or whether there is a space waiting in stdin?

If you really want to monitor keyboard events and trigger SKILL
function on certain events
I can indeed think of some very complicated ways of doing that.
basically not running
dbAccess directly but rather as a subprocess of another program which
can monitor
such events... e.g., wish/tcl.

It might be interested to know why you need to get asynchronous input
in your application?
-jim

On Nov 21, 4:00 pm, camelot <sco...@tiscalinet.it> wrote:
Hi All,
I have a code like this in dbAccess mode:

while(flag == nil

if(//SPACE bar is pressed// then flag = t)
; do some operations....
)

How could I implement: //SPACE bar is pressed// check?

Camelot

p.s. bindkeys are not available in dbAccess mode.
 
Hi,
before the while loop starts, I launched several process through csh
scripts that write some "end process" informattion on a log file.
Inside the loop I monitor if all process completed successfully they
tasks. What I wnato to do is to allow user to to finish the jobs
prematurally by pressing a key. You idea to use an external script
also for this situation could be a goos solution.

Thank you,

Camelot
 

Welcome to EDABoard.com

Sponsor

Back
Top