CompuServe Thread

#LCTERM script ^C send?

19 messages in this thread
#21031From: brian treadwayJul 16, 1990 4:05 PM
I use LCTERM script files to log onto Compuserve. After my modem connects I have to send a Control-C to clear the line and get the "User ID:" prompt. So I put a control-C character at that point in the script file, expecting that it be sent down the line like the other characters not preceded by a sharp sign ("). It isn't. I realize control-C is a rather special character, so I shouldn't be surprised that LCTERM doesn't send it. But is there any way to get around this, by "quoting" the control-C or using a script command? The only thing I've found that works is to wait till the script dials and connects, then type a control-C on the keyboard. THAT one is sent, and the rest of the script works fine after that. But I'd rather not have to watch the thing run!
#21032From: Sysop Bill LeemanJul 16, 1990 4:17 PM
Brian, I'm not sure what the answer is on your ^C problem, however there may be another alternative. You *SHOULD* also be able to use a Carriage Return to "wake up" your CompuServe Node. The only difference is you'll need to add a test for one additional prompt, "Host Id:". If you respond CIS at this prompt you will then receive your "User Id:" prompt you're familiar with. Let me know if you have any questions. Bill
#21040From: brian treadwayJul 17, 1990 11:01 AM
Bill: You suggestion to "wake up" Compuserve with a <CR> instead of a ^C works — thanks! I'm still a little disappointed in this solution to the problem, for two reasons. 1. Suppose I meet a system someday that really _needs_ me to send a ^C? I still can't do it with an LCTERM script. 2. Waking up Compuserve with a <CR> is slightly less satisfactory than doing it with a ^C because when I wake it up with a <CR> it doesn't hang up when I log out. It gives me another "Host Name:" prompt. I have never figured out what I am _supposed_ to respond at that point. "OFF" does the trick, but it's not a "host name." BFT
#21042From: Bill Mayhew [VAX/DECPC]Jul 17, 1990 12:47 PM
Brian, "OFF" is indeed the correct response to disconnect at a "Host name:" prompt. You wouldn't want to type a _real_ host name at this point, because the network would then connect you to that host… and what you want is to be *dis*connected. -Bill
#21050From: Sysop Bill LeemanJul 18, 1990 11:32 AM
Brian, I understand re: the ^C. I'll try to do some research on it this weekend and see if there is a solution there. I didn't mean to imply it couldn't be done as I'm not sure. I just wanted to offer the "quick fix" so you could go to automated mode sooner. I see BillM already covered the "OFF" issue. Bill
#21033From: brian treadwayJul 16, 1990 4:27 PM
Oops! My script ate my sharp sign! Make that 'sharp sign ("#").'
#21056From: David CresseyJul 19, 1990 9:16 AM
I also use LCTERM. When I log onto compuserve, I get a control-C after about three seconds, but I can't for the life of me figure out who is generating it! I'll look into it some more.
#21057From: David CresseyJul 19, 1990 10:10 AM
Well, I found out where the ^C was coming from. It's in my script all right. I didn't see it when I typed the file out, because the "Type" command doesn't make the ^C visible. Immediately ahead of the ^C in the script, I have "#w'2'", which causes LCTERM to wait for 2 seconds before sending the next thing. Of course, actually getting a control-c into the script called for some strange command in SEDT, but that's another story. What follows is conjecture, hearsay, folklore, and misty memory, but it works for me: When a Compuserve node answers the phone, it has a small delay time during which it will reject characters, even after the modem reports "carrier detect". This gets rid of noise characters generated by the transition from no carrier to carrier. It also gets rid of your control-c, unless you wait like I do. Why doesn't it get rid of a CR? I dunno. Regards, [A Dave
#21060From: brian treadwayJul 19, 1990 4:22 PM
Dave: Actually when I changed my script from a control-C to a carriage-return I put in a five-second wait before the carriage-return because I was copying from another script that had one there. Now that I think of it, the old script had no wait, and it had a control-C followed by a carriage return. So it's the wait that makes it work in either case. This time I'll try a wait followed by a control-C. If you get this message, it worked! I wrote the script with EDLIN, which lets me quote control characters (haven't figured out how to get it to delete linefeeds yet — ah for TECO!) but I was only sure the control-C was really there when I dumped the file with DEBUG. Thanks for the clue! BFT
#21061From: brian treadwayJul 19, 1990 6:16 PM
(Sorry about the gaps in my previous reply — EDLIN somehow threw in a bunch of extra carriage-returns without linefeeds… There were some following my control-C too, which of course Compuserve used as an excuse to ignore the control-C… BFT)
#21071From: David CresseyJul 21, 1990 7:17 AM
Glad you could use the help. BTW, if you have trouble with carriage returns where you don't want them in your scripts, it may be useful to remember this rule about LCTERM scripts: If the LAST character before CR-LF is a sharp sign ("#"), then the CR-LF will not be sent to the remote computer. I use this to make my scripts more readable. Enjoy! Dave
#21073From: brian treadwayJul 21, 1990 3:36 PM
Dave: I've been using LCTERM's <CR> <LF> feature to end lines and make script files readable for some time. What I had this time was something different: lines that ended with <CR><CR><CR><CR><LF> and lines that had four or five <CR>'s in the middle. I'm not sure how they got there, and EDLIN wouldn't show that they were there or let me delete them. Meanwhile, when I sent them to Compuserve, they were interpreted as line terminators, so my messages got big blank spaces in the middle. I also had some extra <CR>'s after the control-C I was trying to send at the beginning, which interfered with using the control-C to raise the "User ID:" prompt. But after I realized what was going on I was able to correct the problems. BFT
#21109From: David CresseyJul 28, 1990 6:17 AM
OK. Got it. Good luck with LCTERM. Now, maybe you can help me. Do you know a way to get LCTERM to transmit BACKSPACE when I key a RUBOUT? My fingers have gotten SO-O-O-O accustomed to hitting rubout to erase the previous character. CIS , and now my local Fidonet node, insist that the correct code for that function is BS. (my sentiments exactly, but not the key I want to reach for) 😉 Regards, Dave
#21112From: Sysop Bill LeemanJul 28, 1990 6:06 PM
David, As far as I know there isn't a way to get LCTERM to remap the X> key. I finally had to train myself to hit the F12, Backspace, key whenever using LCTERM and CIS. Bill
#21120From: brian treadwayJul 30, 1990 3:12 PM
Dave: I guess I don't understand your assertion that CIS requires a "BS" character to erase the previous character. When I want to erase the character I've just typed I always hit the key above "Return" labeled with an "X" inside a pentagonal "arrow" outline pointing to the left. I believe that is the one you call RUBOUT, or at least equivalent to it. My "Rainbow Owner's Manual" calls it the "delete" key. I assume, but have not checked, that it generates the ASCII "DEL" character (octal 177), and that LCTERM sends that character to Compuserve. It has the effect of erasing the last character I typed. But what Compuserve sends back is: a backslash, then the character being erased from the input stream. If I continue "deleting" characters, the erased characters continue to be echoed in reverse order as they are erased. A second backslash ("\") is sent back when I stop deleting and start typing again. For example, if I type "go mail<DEL><DEL><DEL><DEL>charges" in response to a "Messages !" prompt, what appears on my screen is Messages !go mail\liam\charges and Compuserve takes me to the CHARGES area. I haven't tried putting a "DEL" character in a script file, but now that I know LCTERM will send a Control-C in a script file I wouldn't be surprised if it will send a "DEL" too. But why would I want to? My keyboard has a "(BS)" label on the F12 key, but I don't think it sends the ASCII "BS" character (octal 10). When I have to send a "BS" (for example to erase a character in a command sent to my modem) I type Control-H. LCTERM sends it just fine. I can't see why an ASCII character with the name "DEL" shouldn't serve to "erase" previously typed characters. What else can it do? ASCII "BS", on the other hand, can be used to back up and overstrike on a hard copy. Why should it be given the additional (and incompatible) job of erasing characters? BFT
#21121From: Bill Mayhew [VAX/DECPC]Jul 30, 1990 4:09 PM
Brian, You are basically correct. DEL should (and does) erase characters. However, that is not CIS' norm. CIS likes BS, and uses it to not only erase the data, but to erase the character on a screen by echoing backspace-space-backspace when it sees one. Some programs (e.g. HOST) will transmit BS when you press the "delete" key, making CIS appear to be doing the right thing when (arguably) it isn't. I agree completely with you that CIS' use of BS for this purpose is undesirable, but evidently you and I are that small minority of people who believe in using standards the wayy they're defined, rather than redefining them. <sigh> -Bill
#21129From: brian treadwayAug 1, 1990 10:02 AM
Does this mean that: 1. If I use the "delete" key to delete, I am a deviant? 2. My use of the "delete" key distracts the diligent CIS computers from the important task of serving those who use "backspace" to delete? 3. I am in danger of finding someday that the "delete" key no longer deletes characters, but deletes files, messages, and even whole forums? BFT
#21130From: Bill Mayhew [VAX/DECPC]Aug 1, 1990 1:22 PM
1. No, you're not deviant; CIS is. 2. I doubt it, but do you really care? 3. No; more likely CIS will just drop support for the key altogether, on the basis that the only people who like its current behavior are those with hardcopy terminals (the \xxx\ echoing stuff) and there are precious few of those. Note: The preceding opinions are those of the author, and do not necessarily represent Forum management, CompuServe management, Miss Management, or any other management… -Bill
#21128From: Sysop Bill LeemanAug 1, 1990 3:23 AM
Brian, Just thought I'd throw my two cents in here <grin>. The F12 key, labeled (BS) *DOES* send the ASCII "BS" character, so you can use that key instead of the Control-H if you wish. That's the one I use all the time when I'm using LCTERM, as I prefer a one-stroke solution. As BillM mentioned, HOST, and Carl's QC program, both map the BS (^H) character to the <X key on the Rainbow. Therefore, you can use it while on CIS like the RUBOUT you're used to, but it's really generating the BackSpace. Bill