Break signal to cancel script

Started by fhammer, March 09, 2017, 01:55:25 PM

Previous topic - Next topic

fhammer

When one of my scripts gets into a undesired loop, I use a Break signal to cancel execution. However, the process for sending a Break signal differs from keyboard to keyboard. I would like to add an item to my PopMenu to do that, so that I don't have to remember the keyboard-specific procedures.

I vaguely-recall seeing a "Send a Break Signal" function in WIL, but now I can't find it.

Any advice?

Thanks.

td

Perhaps you are referring to sending a ctrl+break key sequence using either SendKey or SendKeysTo?  If so, more details about these functions can be found in the Consolidated WIL Help file.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

You may also want to consider the TerminateApp function.  It has a flag parameter, value 0, specifically designed to aid terminating a WinBatch script.  Again check out the Consolidated WIL help file for details.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

fhammer

Thanks TD. SendKey("{CANCEL}") did the trick.

td

"{CANCEL}" is just another way to send the Control+Break key combination.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade