Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Way to Lock Keyboard/Mouse while script runs?

Status
Not open for further replies.

chris86t

Technical User
Jun 13, 2008
41
US
Is there a way lock the keyboard/mouse while a script runs?
 
Sorry to not get back to this sooner, have had massive Internet issues. Does the user have to enter any inputs to the script? If not, you could try using a modal dialog (see the dialogbox command, sorry not at a machine with Procomm at the moment) and disable access to that with the disable command, which would keep the user from being able to access it.

 
I can't complain, you're amazing for all the help you give on this forum.

I found this code:

main proc ; disable stop script option
; NOTE: this also stops a user from exiting Procomm
set aspect control on

; instruct procomm to intercept all keyboard input
; NOTE: this requires any keyboard input to be
; handled by the script itself
set aspect keys on


; your script code


; clear the key input buffer before returning keyboard
; processing to normal
keyflush

; instruct procomm to continue processing keyboard input
; normally
set aspect keys off

; enable stop script option
; NOTE: this allows users to exit procomm
set aspect control off

endproc

in this post:
I havn't tried it yet.
 
Here's a quick and dirty dialog you could add to an existing script. It displays a small window and keeps the user from entering anything via the keyboard or clicking in the Procomm window. I'm assuming you have an existing script this can plug into, which can call and dismiss the dialog as appropriate.

dialogbox 0 8 20 64 12 26 "Caption"
enddialog


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top