Subj : Hi
To   : THE STORM
From : IB JOE
Date : Wed Jan 29 2003 01:24 am

The God Rob wrote me to let me in on what was needed ... thanx!!

Joe


-> RE: Hi
-> BY: IB JOE to ALL on Tue Jan 21 2003 05:47 am

->  > I was editing the simple.src file that came with synchronet and I
-> need  > it to do something....  >  > When the user enters the menu
-> option it makes them press enter after...  > how do I get it to act
-> like a hot key??

-> Joe,

-> Your code looks something like this right now:

-> getstrupr 10
-> crlf
-> pause_reset

-> # Write command to log file
-> logstr

-> # Commands

-> cmdstr C
->     exec_bin chat_sec
->     end_cmd

-> cmdstr CHAT
->     exec_bin chat_sec
->     end_cmd
-> --------------------------------------------------
-> See where it says getstrupr?  That's where you problems begin. This
-> function sits around waiting for the user to enter a string that is
-> 10 characters long and wont do much till they hit enter.  The fix?
-> Very simple.  Look at my
-> sample code below:

-> GETCMD "CMUGPREILX\r"

-> COMPARE_KEY C
-> IF_TRUE
->     exec_bin "chat_sec"
->     GOTO TOP
-> END_IF


-> COMPARE_KEY M
-> IF_TRUE
->     GOTO MESSAGE
->     GOTO TOP
-> END_IF

-> --------------------------------------------------
-> Ok, the GETCMD "CMUGPREILX" <--- This says the user can only pick
-> these keys from the menu. And the COMPARE_KEY checks for each letter
-> that you specified above. If it comes back true, it runs what ever
-> you want it to, if not, it doesn't do anything at all.  Also, when
-> using this, you can ONLY use 1 letter
-> per menu item...  Let me know if this helped you any. :)

-> >X< The Storm >X<
->    The CrazyOp

-> |---------------------------------------------------------|
-> |  ThE CrAzY HoUsE BBS - Telnet: Crazyhouse.darktech.org  |
-> |---------------------------------------------------------|



---
� wcQWK 5.5