Skip to main content

[archive] Run background loop while waiting for mouse click?

  • August 15, 2007
  • 4 replies
  • 0 views

[Migrated content. Thread originally posted on 14 August 2007]

Does anyone know if there is a way to run a loop while waiting for a mouse click?

Ex.. we have a teller waiting for a remote override. I would like to loop every 3-5 sec go see if the override is given and if so then have the teller click ENTER to accept. The problem is if the person giving the override is standing next to them and wants to do it on there screen then they need to be able to either start typing in their override creditials or click on something to stop the loop to be able to give the override.

Teller program takes W$BITMAP image of the current screen and saves it to a file. Then a window pops up at the bottome with Login: ____ Passwd:___ ENTER TO ACCEPT.

Teller then calls supervisor to ask for an override. Supervisor clicks an overrid button and the saved screen is displayed and the same program that is running the override window on the tellers screen is called so the Sup. can give the override.

The override is written to a file. This is the file that the program running on the teller side, needs to monitor so see if the override is given.

Thanks for any help,

4 replies

[Migrated content. Thread originally posted on 14 August 2007]

Does anyone know if there is a way to run a loop while waiting for a mouse click?

Ex.. we have a teller waiting for a remote override. I would like to loop every 3-5 sec go see if the override is given and if so then have the teller click ENTER to accept. The problem is if the person giving the override is standing next to them and wants to do it on there screen then they need to be able to either start typing in their override creditials or click on something to stop the loop to be able to give the override.

Teller program takes W$BITMAP image of the current screen and saves it to a file. Then a window pops up at the bottome with Login: ____ Passwd:___ ENTER TO ACCEPT.

Teller then calls supervisor to ask for an override. Supervisor clicks an overrid button and the saved screen is displayed and the same program that is running the override window on the tellers screen is called so the Sup. can give the override.

The override is written to a file. This is the file that the program running on the teller side, needs to monitor so see if the override is given.

Thanks for any help,
Hi miltonb,

Sounds to me like you need to get into THREAD processing. Start up a process in a separate thread that will detect the override while the main thread is looking after the user interface (mouse, screen etc.)

Something like:-
PERFORM IN THREAD
    CHECK-FOR-OVERRIDE
    HANDLE IN WS-THREAD-HANDLE.

In the CHECK-FOR-OVERRIDE you would detect the approval or rejection from the supervisor (using C$SLEEP to sit idle for short periods between checks) and set another working-storage variable. When this variable changes state, the main thread will be able to detect it and act accordingly.

The main thread should also be able to kill off the checking thread if the override is no longer required or if it has been entered at the tellers terminal.
STOP THREAD WS-THREAD-HANDLE

Ian

[Migrated content. Thread originally posted on 14 August 2007]

Does anyone know if there is a way to run a loop while waiting for a mouse click?

Ex.. we have a teller waiting for a remote override. I would like to loop every 3-5 sec go see if the override is given and if so then have the teller click ENTER to accept. The problem is if the person giving the override is standing next to them and wants to do it on there screen then they need to be able to either start typing in their override creditials or click on something to stop the loop to be able to give the override.

Teller program takes W$BITMAP image of the current screen and saves it to a file. Then a window pops up at the bottome with Login: ____ Passwd:___ ENTER TO ACCEPT.

Teller then calls supervisor to ask for an override. Supervisor clicks an overrid button and the saved screen is displayed and the same program that is running the override window on the tellers screen is called so the Sup. can give the override.

The override is written to a file. This is the file that the program running on the teller side, needs to monitor so see if the override is given.

Thanks for any help,
Also, if you wanted to use a keystroke, you could use ACCEPT FROM INPUT STATUS.

[Migrated content. Thread originally posted on 14 August 2007]

Does anyone know if there is a way to run a loop while waiting for a mouse click?

Ex.. we have a teller waiting for a remote override. I would like to loop every 3-5 sec go see if the override is given and if so then have the teller click ENTER to accept. The problem is if the person giving the override is standing next to them and wants to do it on there screen then they need to be able to either start typing in their override creditials or click on something to stop the loop to be able to give the override.

Teller program takes W$BITMAP image of the current screen and saves it to a file. Then a window pops up at the bottome with Login: ____ Passwd:___ ENTER TO ACCEPT.

Teller then calls supervisor to ask for an override. Supervisor clicks an overrid button and the saved screen is displayed and the same program that is running the override window on the tellers screen is called so the Sup. can give the override.

The override is written to a file. This is the file that the program running on the teller side, needs to monitor so see if the override is given.

Thanks for any help,
Also, if you wanted to use a keystroke, you could use ACCEPT FROM INPUT STATUS.

[Migrated content. Thread originally posted on 14 August 2007]

Does anyone know if there is a way to run a loop while waiting for a mouse click?

Ex.. we have a teller waiting for a remote override. I would like to loop every 3-5 sec go see if the override is given and if so then have the teller click ENTER to accept. The problem is if the person giving the override is standing next to them and wants to do it on there screen then they need to be able to either start typing in their override creditials or click on something to stop the loop to be able to give the override.

Teller program takes W$BITMAP image of the current screen and saves it to a file. Then a window pops up at the bottome with Login: ____ Passwd:___ ENTER TO ACCEPT.

Teller then calls supervisor to ask for an override. Supervisor clicks an overrid button and the saved screen is displayed and the same program that is running the override window on the tellers screen is called so the Sup. can give the override.

The override is written to a file. This is the file that the program running on the teller side, needs to monitor so see if the override is given.

Thanks for any help,
Also, if you wanted to use a keystroke, you could use ACCEPT FROM INPUT STATUS.