• Clearing command string

    From Tegularius@VERT/BAUDHOUS to All on Sat Jul 18 15:33:38 2009
    Experimenting with a Java-script using the Major shell, because itãlooks like the simplest, I have inserted this code into theã:transfers section:ããcmdkey Cã exec "?chgdir"ã setstr ""ã end_cmdããI am happy to have discovered that, because this shell accepts stringsãrather than single key commands, I can pass a string into the Javascript,ãavoiding an extra prompt. E.g., typing "CLC" changes the currentãfile area as desired. One can even change both the library and the area,ãe.g. "CDOS\AE".ããThere's just one problem: when the Major shell accepts its next command,ãthe remaining characters of the command string are still there. I wasãexpecting the line 'setstr ""' to remove them, but it doesn't. Whatãcan I do about this?ã ãã---ã þ Synchronet þ The Bauding House - baudhous.synchro.netã
  • From Digital Man@VERT to Tegularius on Sat Jul 18 19:40:49 2009
    Re: Clearing command stringã By: Tegularius to All on Sat Jul 18 2009 03:33 pmãã > Experimenting with a Java-script using the Major shell, because itã > looks like the simplest, I have inserted this code into theã > :transfers section:ã >ã > cmdkey Cã > exec "?chgdir"ã > setstr ""ã > end_cmdã >ã > I am happy to have discovered that, because this shell accepts stringsã > rather than single key commands, I can pass a string into the Javascript,ã > avoiding an extra prompt. E.g., typing "CLC" changes the currentã > file area as desired. One can even change both the library and the area,ã > e.g. "CDOS\AE".ã >ã > There's just one problem: when the Major shell accepts its next command,ã > the remaining characters of the command string are still there. I wasã > expecting the line 'setstr ""' to remove them, but it doesn't. Whatã > can I do about this?ããYou could change the way the script handles multiple input characters:ããIt currently uses the "ungetstr" function, which puts keys into the low-levelãkeyboard input buffer and there is no method (in Baja or JavaScript) to clearãthis keyboard buffer. Adding this support to the JS console object should beãtrivial, so I'll have a look-see into that.ãã digital manããSnapple "Real Fact" #41:ãShrimp can only swim backward.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã