Subj : RE: [WINServer] telnet-outbound.wcc To : All From : robert.wolfe@robertwolfe.org Date : Fri Nov 30 2018 16:51:18 Newsgroups: wclistserve.win.server Received: by winserver.com (Wildcat! SMTP Router v7.0.454.6) for WINServer@winserver.com; Fri, 30 Nov 2018 17:53:56 -0500 Authentication-Results: dkim.winserver.com; dkim=pass header.d=robertwolfe-org.20150623.gappssmtp.com header.s=20150623 header.i=robertwolfe-org.20150623.gappssmtp.com; Received: from mail-yw1-f41.google.com ([209.85.161.41]) by winserver.com (Wildcat! SMTP v7.0.454.6) with ESMTP id 2615364905.22869.476; Fri, 30 Nov 2018 17:53:55 -0500 Received: by mail-yw1-f41.google.com with SMTP id h32so2979150ywk.2 for ; Fri, 30 Nov 2018 14:53:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=robertwolfe-org.20150623.gappssmtp.com; s=20150623; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-transfer-encoding:content-language:thread-index; bh=rU1g8CsR8XeJoRBAm0j19eYMtJH+1c8oCSZ+PkzISjE=; b=HMXX3AFH7r8WFNxIWD6zS0quyJUL34lMTA9FMAzpvYT2RSP/RaaOvsRiZno0Y523vz DGP7t+Nf2TNRblqOCy25lPDu4H3u0Z8ZWv8UDeE2fcfrWpX2wEGZBawTtNtapUJxk2TB c6DFeOTE+gfsxR3j1Qym0jdTfLUsHnanWf8GefD1tEz9As3i5q5FSV7OiA6mvVYVqLX4 dDcBNAIY4Q7i/yniLErh3G9YaMnmR5LJydEliQ3CXL0BSCwPYpHPwUP3GywGvrcnql7c Z1+g+ukqM2IpesxbsdtSBFlr9NjrdE0wcJm/RaJhTixlP0nNCz9/QVhnx/BsHfdm+kwD 1VxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:content-language :thread-index; bh=rU1g8CsR8XeJoRBAm0j19eYMtJH+1c8oCSZ+PkzISjE=; b=Q1E/hNYn6YgIGpwaYfR33PMb2EJMxrw4kmwi2Uc2XiOo+2N2Xq6ApPf6nvWayaPMWW pk1vIJIVccR8utaDNV+GGyIP8OmAbfohf+3218PtJNhALtTvXO5xN6u/BDRWrga93mBh ZqbYxOy8uIiQUgWF9gA9V/+Y1C0GsGupxmyXBuqpQdqg2jW2hq5fqEHEFBvEAGGL3nPc Bi5It77r6VaFBp1giEy/67ZlTy2xbpI77/mO4FihlZcGWXZm+mQK12mrogBfFb9Fk/JP 5iL+aC/UtpPlEsB86thoKfRvAfDKEhtf3E51ucNLQKuOz3paqe0JUKR+1dtQtmxB2c5x OxnQ== X-Gm-Message-State: AA+aEWZwFBfcrSc8tBHX2TbIa05R8TevcJtYzMShwJ4J16a6aSO1C/3r DhSuQ7v9hjWNfwieMW4y7pQDHybl5+M= X-Google-Smtp-Source: AFSGD/XAIVm7o6Zuso3EzZZI21Gpq7ghCJdq0j81diTEcS/BVvOAZemKZZzhKsuHaQms7OaQIscReg= = X-Received: by 2002:a81:3dc4:: with SMTP id k187-v6mr7862769ywa.415.1543618423582; Fri, 30 Nov 2018 14:53:43 -0800 (PST) Return-Path: Received: from DESKTOPTPI97AD (45-19-112-57.lightspeed.mmphtn.sbcglobal.net. [45.19.112.57]) by smtp.gmail.com with ESMTPSA id w77sm3212901ywa.9.2018.11.30.14.53.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 14:53:43 -0800 (PST) From: To: References: <5BF6D55C.5000907@winserver.com> In-Reply-To: <5BF6D55C.5000907@winserver.com> Subject: RE: [WINServer] telnet-outbound.wcc Date: Fri, 30 Nov 2018 16:51:17 -0600 Message-ID: <0c9101d488ff$35056110$9f102330$@robertwolfe.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: en-us Thread-Index: AQIZEk7uwcOisVunS46PWRMOB/es/QIlYgIYpM6undA= Looks like I need to release my SeaTel outbound telnet WCX next 😊 -----Original Message----- From: listadmin-winserver@winserver.com On Behalf Of Hector Santos Sent: Thursday, November 22, 2018 10:12 AM To: WINServer@winserver.com Subject: Re: [WINServer] telnet-outbound.wcc On 11/22/2018 5:39 AM, Terry Roati wrote: > I am in the process of setting up old doors on Win XP Pro VM using a game Sever which I can connect to using telenet-outbound.wcx however it displays an echo of characters, how do I turn off the echo in the telnet-outbound.wcc? > Terry, Before I get into some wcBASIC details, in general for console applications, like telnet, you can control this with the Telnet client. Most, if not all, telnet clients, will give you an "Local Echo" On/Off option because you never know what the server will do when processing characters. The option is normally called "Local Echo" on the client side Here is looks like for the Windows telnet client: C:\wcat\telnet Welcome to Microsoft Telnet Client Escape Character is 'CTRL+]' Microsoft Telnet> help Commands may be abbreviated. Supported commands are: c - close close current connection d - display display operating parameters o - open hostname [port] connect to hostname (default port 23). q - quit exit telnet set - set set options (type 'set ?' for a list) sen - send send strings to server st - status print status information u - unset unset options (type 'unset ?' for a list) ?/h - help print help information Microsoft Telnet> set ? bsasdel Backspace will be sent as delete crlf New line mode - Causes return key to send CR & LF delasbs Delete will be sent as backspace escape x x is an escape charater to enter telnet client prompt localecho Turn on localecho. <<<<< LOCAL ECHO logfile x x is current client log file logging Turn on logging mode x x is console or stream ntlm Turn on NTLM authentication. term x x is ansi, vt100, vt52, or vtnt Again, most telnet clients will give you a "Local echo" option and its normally off by default because the server is general in control here with how to display of input characters. It can't rely on the client itself to do it right, so the server will do it. Ok, for your needs, using wcBASIC, you mentioned a door? For running the DOOR, the DOOR itself will have its own input and echo features, so you need to see what it does. You can see the one of the example wcDoor32 applications to show you how it reads the Keyboard and does local echoing. But it general, the door will handle it, and normally it will echo. But for pure wcBASIC, lets first understand what are the current read/input/keyboard functions. These are the following functions that you can use in your wcBASIC programs to get input. The intrinsic input function: Input "Prompt: ", line and all the extrinsic input string functions from the library "cmdline.wch" InputString InputMask InputWord InputNumber InputYesNo InputDate InputDateString All do echoing. Can't avoid it. They all use the same internal function: sub ReadString(rs as TReadStringState) By setting various fields in rs (see plus pack cmdline.wcc for example), you can set different input effects, like password stars, but nothing to turn off echoing. To turn off echoing, you have to use the Readkey() and ReadKeyRaw() Functions: function ReadKeyRaw(timeout as boolean = INFINITE) as integer function ReadKey(timeout as integer = 10000) as integer ReadKeyRaw() is pretty "raw" and ReadKey() is more higher level where you can use it for a FSE (Full Screen Editor) beause it handles the special keys for UP/DOWN, HOME, PGUP, PGDN, etc. Only with these two functions can you do a NO ECHO concept. Here is an example function called "MyInputString()" which gives you an LocalEcho option: Function MyInputString(byval maxlen as integer, _ byval localecho as boolean) as String dim s as string = "" dim nlen as integer = 0 dim msecs as integer = 100 const BS = chr(8) const CR = chr(13) const LF = chr(13) do dim k as integer = ReadKey(msecs) select case(k) case 0: // timeout, only for ReadKey() case -1: // timeout, only for ReadKeyRaw() case 8: // backspace if len(s) > 0 then s = left(s, len(s)-1) if localecho then print BS+" "+BS; end if case 10: // ignore linefeed case 13: // exit with carriage return if localecho then print CRLF; exit do case else: if maxlen > 0 and len(s) >= maxlen then exit do end if if localecho then print chr(k); s = s + chr(k) end select loop MyInputString = s End Function Now you can use this in "Telnet Outbound.wcc" but keep in mind how it is "InputString" is used here. It is called twice: s = InputString(0, False) // LINE #78 s = InputString(0) // LINE #85 The first one says, don't wait for input if there any commands in the stack (CurrentCmdLine stack which is part of the "Cmdline.wcx" library) In general, the way this is used is: dim s as string s = InputString(0, FALSE) // don't wait if command in stack if s = "" then // nothing in stack so prompt print "Enter whatever: "; s = InputString(0) end if So to use your new MyInputString(), change the second one to this: dim s as string s = InputString(0, FALSE) // don't wait if command in stack if s = "" then // nothing in stack so prompt print "Enter whatever: "; s = MyInputString(0, FALSE) end if That will work I think for you. Hope these details helps. Please ask developers question in the Developer list or forums. Thanks -- Hector, Engineering & Technical Support Santronics Software, Inc. http://www.santronics.com (sales) http://www.winserver.com (support) http://www.winserver.com/AupInfo (Online AUP Help) Office: 305-248-3204 --------------------------------------------------------------------- To unsubscribe, send e-mail to wclistserve@winserver.com with UNSUBSCRIBE WINServer in the message body on a line by itself. To contact the list admin, e-mail ListAdmin@winserver.com --------------------------------------------------------------------- --- Platinum Xpress/Win/WINServer v3.1 * Origin: Prison Board BBS Mesquite Tx //telnet.RDFIG.NET www. (1:124/5013) .