/////////////////////////////////////////////////////////////////////////////// // File: outfirst.cs // // Contents: // This is an expanded version of the included logout.cs sample script. // outfirst.cs prevents the user from disconnecting, closing a session, or // exiting TinyTERM unless the user has logged out first. Otherwise, // a message window pops up reminding the user to log out, and the script // terminates with the connection still active. // // This script will only work on serial connections if the host is // configured to drop DTR on logout. // // To use this script, configure it to run when the session is opened. It // will define the "script_sessDown" and "script_sessDiscon" callbacks. // // Originated by P. Clark, Century Software 5/20/1999 /////////////////////////////////////////////////////////////////////////////// // function to check if still connected function StillLoggedIn() { var line1 = "The connection is still active.\r\n"; var line2 = "You must log out before exiting TinyTERM."; var message = line1 + line2; var title = "LOG OUT BEFORE EXITING"; if (te.IsConnected) { msgbox(message,title,0); return(1); } } // called when the session is closed function script_sessDown() { StillLoggedIn(); } // called on disconnect function script_sessDiscon() { StillLoggedIn(); }