Menu Polling/Defeat Pause
From
Corvey@VERT to
Digital Man on Tue Jan 17 04:46:44 2006
DM > While sitting at the Ctrl-P prompt or the Inter-BBS prompt or while inãDM > multi-node chat, instant messages and telegrams are received "instantly".ãDM > SomeãDM > 3rd party command shells implement constant polling of messages at allãDM > prompts.ããC > Ok, those prompt are what I like, how can I make the main menu and game ãC > menãC > be "instantly" like the CTRL-P prompt?ããDM > The main menu, it depends on which command shell you're using. Basically,ãDM > youãDM > need an "inkey loop" instead of calling getkey. See the example in ãDM > sbbsimsg.js.ãDM > This same method can be applied to the prompts in exec/xtrn_sec.js ãDM > (external programs section).ãã digital manãããIn sbbsimsg.js I see:ãã"key=console.inkey(K_UPPER, 500);"ããbut I'm not sure in where in xtrn_sec.js to place code to make it work.ãããI am noob, can you be more precise, from and where to place code to make this ãwork for me?ããThanks,ãcorveyã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
From
Digital Man@VERT to
Corvey on Tue Jan 17 15:45:36 2006
Re: Menu Polling/Defeat Pauseã By: Corvey to Digital Man on Tue Jan 17 2006 04:46 amãã > DM > While sitting at the Ctrl-P prompt or the Inter-BBS prompt or while inã > DM > multi-node chat, instant messages and telegrams are received "instantlã > DM > Someã > DM > 3rd party command shells implement constant polling of messages at allã > DM > prompts.ã > ã > C > Ok, those prompt are what I like, how can I make the main menu and gaã > C > menã > C > be "instantly" like the CTRL-P prompt?ã > ã > DM > The main menu, it depends on which command shell you're using. Basicalã > DM > youã > DM > need an "inkey loop" instead of calling getkey. See the example inã > DM > sbbsimsg.js.ã > DM > This same method can be applied to the prompts in exec/xtrn_sec.jsã > DM > (external programs section).ãã > In sbbsimsg.js I see:ã > ã > "key=console.inkey(K_UPPER, 500);"ã > ã > but I'm not sure in where in xtrn_sec.js to place code to make it work.ã > ã > ã > I am noob, can you be more precise, from and where to place code to make thiã > work for me?ããThe first step would be to replace the line "xtrn_section" with "execã?xtrn_sec" in each of your command shell source files (exec/*.src) andãrecompile with Baja. Otherwise, the internal (native C) version of the externalãprogram menu will be displayed instead of the exec/xtrn_sec.js module.ããThe second step would be to replace the 2 calls to console.getnum() inãxtrn_sec.js with a loop, similar to that found in sbbsimsg.js:ãã while(bbs.online && !(bbs.sys_status&SS_ABORT)) {ã key=console.inkey(K_UPPER, 500);ã }ããinside that loop you'll need to figure out what number the user is typing andãprint that number, detect a carriage-return ('\r') and continue on the script.ãIf you have no programming knowledge or patience to learn, then this task isãprobably beyond your abilities.ãã digital manããSnapple "Real Fact" #38:ãFish cough...ãNorco, CA WX: 71.0øF, 26% humidity, 0 mph NE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã