Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Reviewed and revised December 2023

tab(-10,AG_DISCONNECTPW); pw{"~"; msg{"~"; title;}} chr(127);     Tab(-10,x) Syntax Notes

AG_DISCONNECTPW (53) allows the application to establish a disconnect/terminate password, which the user must enter in order to disconnect (from ATE) or terminate (from a local A-Shell/Windows session). When established, this supersedes the big dialog/warning message that otherwise appears when you click on the "X". And perhaps more importantly, it also gets triggered when the "Disconnect" menu option is clicked, which previously exited without any fanfare whatsoever.

Note that unlike most other AG_xxx functions, the delimiter here is tilde. The msg and title parameters are optional, but if included, must be preceded by a tilde to mark the end of the prior parameter. And in this case, trailing blanks between the end of pw and subsequent tilde or chr(127) are significant.

Parameters

pw

If null, the password feature is disabled and disconnect behavior reverts to the way it was before.

msg

can be used to replace the standard message which otherwise appears on the password dialog:

ashref_img40

Msg may include a CRLF to force a line break; otherwise it is wrapped to fit the space. Since the space is designed for about 200 lower case characters, if you have a lot less, you might want to use a leading CRLF just to vertically center it.

title

replaces the default title ("ATE Disconnect" or "Terminate A-Shell Session?") of the dialog box that prompts for the password.

Response

none

Comments

The combined length limit for msg plus title is 248 characters.

Since you can set the password any way you like, some$ people use a formula, perhaps based on the date, or on any information you can obtain programmatically about the environment, job, etc., so that it can be given out as needed without necessarily revealing the formula.

If want to allow the user to disconnect from certain "safe" places (like the main menu), then you can clear the password.

The password is not encrypted, because no matter how secretive we make it, there is no way to stop the user from forcefully disconnecting by such brutal methods as rebooting, pulling the Ethernet cable, powering down, etc. So this is at best a merely a way to discourage sloppiness rather than a way to prevent it entirely.

There is no way to disable the password but still require the user to enter some kind of confirmation. To get something like that effect, just change the message to explicitly state what the 'password' is, e.g. "...or enter 'GERONIMO' in the box below:"