I see ... like thisON *BUTTON doesn't have anything to do with QuickEdit.
It seems to be working fine here -- how are you trying to trigger it? (You do know that it's not an asynchronous trigger? TCC has to be waiting for keyboard input.)
on lbutton beep inkey %%foo
It's not "satisfying the INKEY"; it's interrupting INKEY and executing something else instead.I was thinking it shouldn't satisfy the INKEY if INKEY isn't accepting mouse clicks. In what other circumstances would ON *BUTTON work?
1) The ON handlers only affect the current batch file level -- a CALL'd batch file is a nested file, so the ON handlers aren't referenced, and there's nothing to restore.Rex:
This thread seems appropriate to ask:
1/ are ALL "ON" handlers of a batch file restored when a CALL'd batch file returns, or only - as documented in the paragrpah titled "Scope" of the "ON" command help topic - only the BREAK and ERROR handlers?
2/ How is ON scope affected by "calling a label", i.e., a part of the same batch file?
"GOSUB filename" runs a nested batch file, so the ON handlers don't exist.One additional question:
3/ How is ON scope affected when doing a GOSUB with an explicit filename? This has two subquestions - when the explicit file is actually the same as the one which executes the GOSUB, and the more common case of it being a different file...
The last sentence of HELP -> ON, subsection Scope:1) The ON handlers only affect the current batch file level -- a CALL'd batch file is a nested file, so the ON handlers aren't referenced, and there's nothing to restore.
While I agree with the original purpose of in-file CALL, CALL offers more flexibility than GOSUB for passing parameters, and for modifying passed parameters, so I would not be surprised if TCC-only users would take advantage of this feature. Regardless, your answer to my question was as expected - if control moves out of the file, ON does not propagate, but inside it does.2) It's not affected at all; calling a label is done within the same batch file. But the question is probably moot, since that syntax is for batch files written for CMD.EXE, which doesn't support ON handlers anyway.