• Enter key and quit

    From Night_Flyer@VERT to All on Sun Mar 18 06:48:33 2007
    Im venturing into my first real foray into Baja outside of binding keys on my ãmain menu...ããso far so good, but I cant seem to find where to bind the enter key to a ãdefault action. ããbasically I want it to behave like a quit. hit enter and the program defaults ãto the end.ããwhat Im working on is a one liner (actually Im butchering anothers previous ãwork) and I want it to say "Want to add a quote?" Y[N] where N is the default ãkey and it exits the program at that point.ããthanks for any pointersã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Angus McLeod@VERT/ANJO to Night_Flyer on Sun Mar 18 12:17:00 2007
    Re: Enter key and quitã By: Night_Flyer to All on Sun Mar 18 2007 05:48:00ãã > so far so good, but I cant seem to find where to bind the enter key to aã > default action.ã > ã > basically I want it to behave like a quit. hit enter and the program defaultã > to the end.ã > ã > what Im working on is a one liner (actually Im butchering anothers previousã > work) and I want it to say "Want to add a quote?" Y[N] where N is the defaulã > key and it exits the program at that point.ããThis isn't exactly the answer to your question but have a look at BAJA's ãuseful "NO_YES" verb.ã---ãPlaying: "Star" by "Elysian Fields" from the "Bleed Your Cedar" albumã þ Synchronet þ Where we BAJA Rob into writing our modules. The ANJO BBSã
  • From Digital Man@VERT to Night_Flyer on Sun Mar 18 11:03:11 2007
    Re: Enter key and quitã By: Night_Flyer to All on Sun Mar 18 2007 06:48 amãã > Im venturing into my first real foray into Baja outside of binding keys on mã > main menu...ã > ã > so far so good, but I cant seem to find where to bind the enter key to aã > default action.ã > ã > basically I want it to behave like a quit. hit enter and the program defaultã > to the end.ããEnter in response to what? GETSTR or GETKEY or GETCMD?ããGETSTR will return a blank (empty) string in response to the user just hittingãthe enter key, where as GETKEY/CMD will set the current command key to '\r'.ããSee http://synchro.net/docs/baja.html#CommandKeyConstants for more details.ãã digital man (xbox-live: digitlman)ããSnapple "Real Fact" #120:ãThe only continent without native reptiles or snakes is Antarctica. ãNorco, CA WX: 58.1øF, 71% humidity, 0 mph ENE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From The Millionaire@VERT/PARKAVE to Digital Man on Sun Mar 18 11:26:00 2007
    Re: Enter key and quitã By: Digital Man to Night_Flyer on Sun Mar 18 2007 11:03 amãã > Enter in response to what? GETSTR or GETKEY or GETCMD?ã > ã > GETSTR will return a blank (empty) string in response to the user just hittiã > the enter key, where as GETKEY/CMD will set the current command key to '\r'.ã > ã > See http://synchro.net/docs/baja.html#CommandKeyConstants for more details.ã > ã > digital man (xbox-live: digitlman)ã > ã > Snapple "Real Fact" #120:ã > The only continent without native reptiles or snakes is Antarctica.ã > Norco, CA WX: 58.1øF, 71% humidity, 0 mph ENE wind, 0.00 inches rain/24hrsã > ã"\r" means return key right?ãã---ã þ Synchronet þ Watch "24" Monday Nights On Fox!ã
  • From Night_Flyer@VERT to Digital Man on Sun Mar 18 13:05:48 2007
    Enter in response to what? GETSTR or GETKEY or GETCMD?ããthe current code is for a GETCMDã-----ãgetcmd YN\r?ãlogkeyããcmdkey Nã goto theendãend_cmdããcmdkey Yã goto writeãend_cmdã-----ãhitting the return key sends me to "Y"ããall I want it to do is behave the same as "N"ããã > ã > GETSTR will return a blank (empty) string in response to the user just ã > hitting the enter key, where as GETKEY/CMD will set the current command key ã > to '\r'.ã ãso how do you set the current command key? The Yes_no works fine, but Yes is ãhighlighted :/ãã> ã > See http://synchro.net/docs/baja.html#CommandKeyConstants for more details.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Night_Flyer@VERT to Night_Flyer on Sun Mar 18 14:27:05 2007
    Enter in response to what? GETSTR or GETKEY or GETCMD?ããhere's what I did to get it to work, but I have a feeling that it was a hack ãjobã ãgetcmd NY\r?ãlogkeyããcmdkey Nã goto theendãend_cmdããcmdkey Yã goto writeãend_cmdããcompare_str ""ãif_trueã goto theendãend_ifã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Night_Flyer on Mon Mar 19 15:34:41 2007
    Re: Re: Enter key and quitã By: Night_Flyer to Digital Man on Sun Mar 18 2007 01:05 pmãã > > Enter in response to what? GETSTR or GETKEY or GETCMD?ã > ã > the current code is for a GETCMDã > -----ã > getcmd YN\r?ã > logkeyã > ã > cmdkey Nã > goto theendã > end_cmdã > ã > cmdkey Yã > goto writeã > end_cmdããFrom baja.html:ããIf a RETURN or GOTO function will beãexecuted before the END_CMD function, then a CMD_POP function must be executedãto tell the interpreter to "forget" the previous CMD_HOME function.ããSo looks like you're missing some CMD_POP calls in there.ãã > -----ã > hitting the return key sends me to "Y"ããInteresting. I don't see why it would.ãã > all I want it to do is behave the same as "N"ããSo create a cmdkey \r block.ãã > > GETSTR will return a blank (empty) string in response to the user justã > > hitting the enter key, where as GETKEY/CMD will set the current command kã > > to '\r'.ã > ã > so how do you set the current command key?ããUNGETKEYãã > The Yes_no works fine, but Yes is highlighted :/ããSo use the NO_YES function instead.ãã digital man (xbox-live: digitlman)ããSnapple "Real Fact" #85:ãThe Mona Lisa has no eyebrows.ãNorco, CA WX: 79.3øF, 42% humidity, 0 mph SE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Night_Flyer@VERT to Digital Man on Mon Mar 19 16:36:43 2007
    Re: Re: Enter key and quitã By: Night_Flyer to Digital Man on Sun Mar 18 2007 01:05 pmãã > > > Enter in response to what? GETSTR or GETKEY or GETCMD?ã > > ã > > the current code is for a GETCMDã > > -----ã > > getcmd YN\r?ã > > logkeyã > ã > > cmdkey Nã > goto theendã > > end_cmdã > ã > > cmdkey Yã > goto writeã > > end_cmdã > ã > From baja.html:ãã > If a RETURN or GOTO function will beã > executed before the END_CMD function, then a CMD_POP function must be ã > executed to tell the interpreter to "forget" the previous CMD_HOME ã > function.ãã > So looks like you're missing some CMD_POP calls in there.ã ãall the examples I looked at didnt have that in there (that I noticed any way) ãthe "cmdkey \r" call worked so ill leave that in... Thanks.ããdont know how much more of this I want to play with considering its mosly ãdoing what I want.ããSince this is for a one liner wall, is there a way to get the length of the ã_useron.alias?ããand with that info cut off the number of characters available in the get line?ããX = 50ãgetline line1 X K_UPPER|K_ALPHA|NOCRLFã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Night_Flyer on Mon Mar 19 16:45:56 2007
    Re: Re: Enter key and quitã By: Night_Flyer to Digital Man on Mon Mar 19 2007 04:36 pmãã > > From baja.html:ã > ã > > If a RETURN or GOTO function will beã > > executed before the END_CMD function, then a CMD_POP function must beã > > executed to tell the interpreter to "forget" the previous CMD_HOMEã > > function.ã > ã > > So looks like you're missing some CMD_POP calls in there.ã > ã > all the examples I looked at didnt have that in there (that I noticed any waããIf you're not using CMD_HOME, then you don't need it.ãã > the "cmdkey \r" call worked so ill leave that in... Thanks.ã > ã > dont know how much more of this I want to play with considering its moslyã > doing what I want.ã > ã > Since this is for a one liner wall, is there a way to get the length of theã > _useron.alias?ããUse STRLENãã > and with that info cut off the number of characters available in the get linã > ã > X = 50ã > getline line1 X K_UPPER|K_ALPHA|NOCRLFããIf you want to know the *maximum* length of _useron.alias, use the LEN_ALIASãconstant (defined in userdefs.inc).ãã digital man (xbox-live: digitlman)ããSnapple "Real Fact" #123:ãBeavers were once the size of bears. ãNorco, CA WX: 92.3øF, 30% humidity, 0 mph ESE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Night_Flyer@VERT to Digital Man on Mon Mar 19 19:00:23 2007
    ã > Use STRLENã ãwhen I compile I get an error stating that _useron.alias is an INT?!?ããheres what Im trying to doãã 80 characters - overhead (7 characters) - username length = input box sizeããthe above should be simple... but for some reason it isnt...ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From MRoblivious1bmf@VERT to Night_Flyer on Mon Mar 19 21:03:12 2007
    To: Night_Flyerã.,: This is something about Re: Enter key and quit,ã Night_Flyer said it to Digital Man on Mon Mar 19 2007 04:36 pmã--ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ-ÄÄÄÄ---ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ---ÄÄÄÄÄÄÄÄÄ--ÄÄÄÄÄÄÄÄã > and with that info cut off the number of characters available in the get linãã > X = 50 getline line1 X K_UPPER|K_ALPHA|NOCRLFãã > --- Synchronet 3.14b-Win32 NNTP Service 1.101 * Vertrauen - Riversideã > County, California - telnet://vert.synchro.netããããthere's more than one way to skin a cat.ããlook at the baja mods on vert.synchro.netãã--- Synchronet 3.14a-Win32 NewsLink 1.85ã * eob - Racine, WisconSIN - telnet://eob.darktech.orgã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Night_Flyer on Mon Mar 19 21:19:40 2007
    Re: Re: Enter key and quitã By: Night_Flyer to Digital Man on Mon Mar 19 2007 07:00 pmãã > ã > > Use STRLENã > ã > when I compile I get an error stating that _useron.alias is an INT?!?ã > ã > heres what Im trying to doã > ã > 80 characters - overhead (7 characters) - username length = input box sizeã > ã > the above should be simple... but for some reason it isnt...ããPast the code you're trying to compile and the error message.ãã digital man (xbox-live: digitlman)ããSnapple "Real Fact" #51:ãThere are 63,360 inches in a mile.ãNorco, CA WX: 57.0øF, 66% humidity, 0 mph SSE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Night_Flyer@VERT to Digital Man on Thu Mar 22 20:00:10 2007
    Re: Re: Enter key and quitã By: Night_Flyer to Digital Man on Mon Mar 19 2007 07:00 pmãã > > ã > > > Use STRLENã > > ã > > when I compile I get an error stating that _useron.alias is an INT?!?ã > ã > > heres what Im trying to doã > ã 80 characters - overhead (7 characters) - username length = input box sizeãã > > the above should be simple... but for some reason it isnt...ã > ã > Past the code you're trying to compile and the error message.ããI played with it a bit more and got it to work, not sure what I was doing ãwrong, but now it does the equasion I was trying to accomplish, so users ãmessage + users name wont go over 80 characters togetherã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã