• RE: [WINServer] telnet-outbound.wcc

    From Robert.Wolfe@Robertwolfe.Org@1:124/5013 to All on Friday, January 20, 2023 10:12:57
    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 <WINServer@winserver.com>; 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: <robert.wolfe@robertwolfe.org>
    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 <WINServer@winserver.com>
    (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
    Fri, 30 Nov 2018 14:53:43 -0800 (PST)
    From: <robert.wolfe@robertwolfe.org>
    To: <WINServer@winserver.com>
    References: <FR1P152MB029445D1D07C8A89A0010C37D5DB0@FR1P152MB0294.LAMP152.PROD.OUTLOOK.COM>
    <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 <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)
  • From Terryroati@Outlook.Com@1:124/5013 to All on Friday, January 20, 2023 10:12:57
    Newsgroups: wclistserve.win.server
    Received: by winserver.com (Wildcat! SMTP Router v7.0.454.6)
    for WINServer@winserver.com; Fri, 30 Nov 2018 18:04:36 -0500 Authentication-Results: dkim.winserver.com;
    dkim=pass header.d=outlook.com header.s=selector1 header.i=outlook.com; Received: from NAM02-BL2-obe.outbound.protection.outlook.com ([40.92.3.82])
    by winserver.com (Wildcat! SMTP v7.0.454.6) with ESMTP
    id 2616005725.22869.4076; Fri, 30 Nov 2018 18:04:36 -0500 Received-SPF: pass (winserver.com: domain of terryroati@outlook.com
    designates 40.92.3.82 as permitted sender)
    receiver=winserver.com;
    client-ip=40.92.3.82;
    envelope-from=terryroati@outlook.com;
    helo=nam02-bl2-obe.outbound.protection.outlook.com; Authentication-Results: winserver.com
    reason=(smtp.client-ip=40.92.3.82; smtp.helo=nam02-bl2-obe.outbound.protection.outlook.com);
    spf=pass smtp.mailfrom=terryroati@outlook.com;
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
    s=selector1;

    h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderAD Check;
    bh=Bz+U6SaZJ9FgGpShbmc1aFP0XqwmFM/FegV2NIrpW7s=;

    b=c/ZyGqZq0jVMM5HOqRZ1yiCXWnRkHrmOIN2+POep3qExFyO1gSbwVSRCY1Xl+0BteC0WGMfmVVCh5 ymIzjQYkglWo2DgtRrhpKc7hA+hpmcSkxptc70IWuXxv8OpKWCTjYBGwG63GFdfek5i8sVtYIIiumKg lNyRd3XoTOK5gOs1PDcz01aH63jUS7YZJiM2tQxhLmiJOuUVNUvhYcdb8YOGXpiIBI8m1vDw8REk6i8 iV7/WIuaiJmYZDDqvZqyCp5Usiq070RAyaqPVGWHSEOZ3ZZTnE7ruo2gAYL/ZSsldT/poxaePheXSer LqVKs82clNIfeKtq9vf+cvAG0OMg==
    Received: from CY1NAM02FT025.eop-nam02.prod.protection.outlook.com
    (10.152.74.52) by CY1NAM02HT178.eop-nam02.prod.protection.outlook.com
    (10.152.75.6) with Microsoft SMTP Server (version=TLS1_2,
    cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.18; Fri, 30 Nov
    2018 23:04:33 +0000
    Received: from FR1P152MB0294.LAMP152.PROD.OUTLOOK.COM (10.152.74.55) by
    CY1NAM02FT025.mail.protection.outlook.com (10.152.75.148) with Microsoft SMTP
    Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
    15.20.1382.18 via Frontend Transport; Fri, 30 Nov 2018 23:04:33 +0000 Received: from FR1P152MB0294.LAMP152.PROD.OUTLOOK.COM
    ([fe80::24bd:ed2c:7149:d998]) by FR1P152MB0294.LAMP152.PROD.OUTLOOK.COM
    ([fe80::24bd:ed2c:7149:d998%3]) with mapi id 15.20.1382.020; Fri, 30 Nov 2018
    23:04:33 +0000
    From: Terry Roati <terryroati@outlook.com>
    To: "WINServer@winserver.com" <WINServer@winserver.com>
    Subject: RE: [WINServer] telnet-outbound.wcc
    Thread-Topic: [WINServer] telnet-outbound.wcc
    Thread-Index: AdSCOLaOtWnwl4HzQaSHHlh/zG7erQARWm8AAaBE6YAAAEIq0A==
    Date: Fri, 30 Nov 2018 23:04:33 +0000
    Message-ID: <FR1P152MB0294FA6171E852655D65BA11D5D30@FR1P152MB0294.LAMP152.PROD.OUTLOOK.COM> References: <FR1P152MB029445D1D07C8A89A0010C37D5DB0@FR1P152MB0294.LAMP152.PROD.OUTLOOK.COM>
    <5BF6D55C.5000907@winserver.com>
    <0c9101d488ff$35056110$9f102330$@robertwolfe.org>
    In-Reply-To: <0c9101d488ff$35056110$9f102330$@robertwolfe.org>
    Accept-Language: en-AU, en-US
    Content-Language: en-US
    X-MS-Has-Attach:
    X-MS-TNEF-Correlator:
    x-incomingtopheadermarker: OriginalChecksum:5E68ACAE70A8AC9A7D155F588166120C45EAEE95F65FA834A8B333ADC549C5 86;UpperCasedChecksum:B3BBC676E60C8E319A107EDE048E9DA7447BE1E2C50DBE39D61157738 63A7E9B;SizeAsReceived:7156;Count:46
    x-ms-exchange-messagesentrepresentingtype: 1
    x-tmn: [pvFRg2sNBcGYqwteky6/sClzZFEpmGzO]
    x-ms-publictraffictype: Email
    x-microsoft-exchange-diagnostics: 1;CY1NAM02HT178;6:chyL4/oVU/W1E3GPbolvb7dxRm1LfY8tXNj0D5wQZH1tuXtqGJRy63LRAh96Z xWzaT4Ychx9xClfq+oABavEhqMvGowSljqUQomxcAdNbcbZrt4HHfioZlHJOo1+07NXM11bYFjPKPqa JBbOYPXLLEqABAtaTmQVVDcYAEvKjFzZooiUZ/wdt27wj6C+dQaC3oJUnRETyRXL4/4ULYPZ1MX6B4U 7hejd9dER0FMRSAEOH7AZPomiFSxGLqTXuV8d46qPtkNG6So3eIL8uhnyEgRcxnXSG5ELt1N+/dn4Mx i1mwu/fQobRDrnV4+22U8GftVs/ms50/odWSL9a/MXBVuat5EQsVNDabeyB02PPLjEWddPAXpES34LA C9wpDnCrBFle5OryNPepF2hrfomJDMtBdlzGkksoS6eDFtXtOapU0gLuZ+5+qWQULp7HPk5+eEXUgRP OaxAOeRwjEtQZQ==;5:OQs2Gwc+mDSKttIcvKU0iW+F4Lf15X7wx2d2180htUAofeXqyaclOObkdAq8 Frx+CHBngNkkCsWDSQkhlWKi+07/AhhBJv+Ed2yZ8X93KpZP/PUSDbuTQKkiLND0EKfS2xZ+Y1iOIrt ZngCbqQlbi2Tuv0O7KDMDh40hF2kYJUI=;7:Bx8SmDB8PDecZwr1mUYsO6sMPb+EmWIPHFWvpamJmdN SGfbQlJ5zqgRzPcXwZy1L/CPDT2c2ON0m6MR63/OuxENv+KvCFTLPgL5EDtgx5HhfwY92gIPVr5hP6m gN9RymhE+GudgI7mNNL1CQplg8ow==
    x-incomingheadercount: 46
    x-eopattributedmessage: 0
    x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(201702061078)(5061506573)(5061507331)(160 3103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101475 )(1601125500)(1701031045);SRVR:CY1NAM02HT178;
    x-ms-traffictypediagnostic: CY1NAM02HT178:
    x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(4566010)(82015058);SRVR:CY1NAM02HT178;BCL:0;PCL:0;RULEID:;S RVR:CY1NAM02HT178;
    x-microsoft-antispam-message-info: m7BpF9zCBJe0D0q6o/kBoY3b3WaKFn4UZXrcMJzmRKKjbzcDAuh8ojRAixHbYJiJ
    Content-Type: text/plain; charset="utf-8"
    Content-Transfer-Encoding: base64
    MIME-Version: 1.0
    X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: 5c073784-6725-471b-d3ab-08d657183138 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2018 23:04:33.3811
    (UTC)
    X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT178

    Hello Robert,

    Mike Purdy helped me so no longer an issue.

    At present I am just experimenting and getting back into WINS after many years,
    after this will be getting back into Fido and Wildnet etc.

    Once Hector releases the next update, I plan to get a CD and do a clean install
    and then add back some of the old stuff.

    Thanks.

    Terry

    -----Original Message-----
    From: listadmin-winserver@winserver.com <listadmin-winserver@winserver.com> On Behalf Of robert.wolfe@robertwolfe.org
    Sent: Saturday, December 1, 2018 8:51 AM
    To: WINServer@winserver.com
    Subject: RE: [WINServer] telnet-outbound.wcc

    Looks like I need to release my SeaTel outbound telnet WCX next

    -----Original Message-----
    From: listadmin-winserver@winserver.com <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. https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.santronics .com&amp;data=02%7C01%7C%7Ca1c70f6f636e444523bc08d65716ee3a%7C84df9e7fe9f640afb 435aaaaaaaaaaaa%7C1%7C0%7C636792153334359162&amp;sdata=gzuvS03Xb%2Fcq7DgoNSA6BM M5%2FNpHe0nPmlGVn4ngBH8%3D&amp;reserved=0 (sales) https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.winserver. com&amp;data=02%7C01%7C%7Ca1c70f6f636e444523bc08d65716ee3a%7C84df9e7fe9f640afb4 35aaaaaaaaaaaa%7C1%7C0%7C636792153334359162&amp;sdata=%2FPn9JW%2BO0PpQqqNjzC02M e8Gk%2BmUkpdvrm8mMtgaVAI%3D&amp;reserved=0 (support) https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.winserver. com%2FAupInfo&amp;data=02%7C01%7C%7Ca1c70f6f636e444523bc08d65716ee3a%7C84df9e7f e9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636792153334359162&amp;sdata=KntSridCMaqERAH 0TASK%2FVb6ZeHnlHt8ZoJNjDfLpR0%3D&amp;reserved=0 (Online AUP Help)
    Office: 305-248-3204



    ------------
  • From Winserver.Support@Winserver.Com@1:124/5013 to All on Friday, January 20, 2023 10:12:57
    Newsgroups: wclistserve.win.server
    Received: by winserver.com (Wildcat! SMTP Router v7.0.454.6)
    for WINServer@winserver.com; Thu, 22 Nov 2018 11:12:08 -0500 Received: from [192.168.1.68] ([99.121.5.8])
    by winserver.com (Wildcat! SMTP v7.0.454.6) with ESMTP
    id 1900065345.45468.1712; Thu, 22 Nov 2018 11:12:07 -0500
    Message-ID: <5BF6D55C.5000907@winserver.com>
    Date: Thu, 22 Nov 2018 11:12:12 -0500
    From: Hector Santos <winserver.support@winserver.com>
    Organization: Santronics Software, Inc
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.8.1
    MIME-Version: 1.0
    To: WINServer@winserver.com
    Subject: Re: [WINServer] telnet-outbound.wcc
    References: <FR1P152MB029445D1D07C8A89A0010C37D5DB0@FR1P152MB0294.LAMP152.PROD.OUTLOOK.COM> In-Reply-To: <FR1P152MB029445D1D07C8A89A0010C37D5DB0@FR1P152MB0294.LAMP152.PROD.OUTLOOK.COM> Content-Type: multipart/mixed; boundary="------------070709090002060201010401"



    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

    begin:vcard
    fn:Hector Santos
    n:Santos;Hector
    email;internet:winserver.support@winserver.com
    tel;work:305-248-3204
    version:2.1
    end:vcard

    --- Platinum Xpress/Win/WINServer v3.1
    * Origin: Prison Board BBS Mesquite Tx //telnet.RDFIG.NET www. (1:124/5013)