? tab(-10, AG_DISCONNECTPW); pw; chr(127);
? tab(-10, AG_DISCONNECTPW); pw; "~"; msg; chr(127);
? tab(-10, AG_DISCONNECTPW); pw; "~"; msg; "~"; title; chr(127);
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. Syntax is any of the following:
Parameters
pw (Num),up to 15 bytes)
If null, the password feature is disabled and disconnect behavior reverts to the way it was before.
msg (Num)
can be used to replace the standard message which otherwise appears on the password dialog:
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 (Num)
replaces the default title ("ATE Disconnect" or "Terminate A-Shell Session?") of the dialog box that prompts for the password.
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:"
History
2006 March, A-Shell 4.9.952: Added to A-Shell