Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Qbasic Chat Program - Other Code Bank


Qbasic Chat Program
LAN Qbasic Chat Program. Transferred to main account
                ':::::::::::::::::::::::v1.5::::::::::::::::::::::::::::::::::::::::
'The instant messaging-like environment has been maintained and the runoff
'error has been solved by automatically deleting the chat record after a set
'character length. The program does not read from a .txt file and instead
'reads from a .DAT file which allows multiple user access.  Response octave
' has been increased to allow easier hearing for in-room chatting.
 
':::::::::::::::::::::::v1.0::::::::::::::::::::::::::::::::::::::::
'This is a chatting program w hich allows an instant messaging -like
'environment accomplished by editing/reading a text document on a local
'network. The text document can be used by only one user at any given time
'and the problem in which to signal the other user has not been solved yet.
 
CLS
 
GOSUB A100.ENTER.USER.NAME
GOSUB B100.DESIGN
END
 
'""""""""""""""""""""""""""""""""""""""""
'"           START SCREEN               "
'""""""""""""""""""""""""""""""""""""""""
A100.ENTER.USER.NAME:
LOCATE 10, 20
INPUT "ENTER USERNAME: ", USER$
LOCATE 12, 20
INPUT "ENTER EXISTING FILE PATH: ", FILENAME$
CLS 'CLEAR SCREEN
RETURN
 
':::::::::::::::::::::::::::::::::::::
':          CHAT WINDOW DESIGN       :
':::::::::::::::::::::::::::::::::::::
B100.DESIGN:
        SCREEN 12:
        LINE (1, 1)-(450, 450), 5, B
        GOSUB C200.FILE.READ
        LOCATE 28, 1
        INPUT "RESPOND?(Y/N)", RESPOND$
 
        IF UCASE$(RESPOND$) = "Y" THEN
                CLS
                LINE (1, 1)-(450, 450), 5, B
                LOCATE 2, 2
                INPUT "RESPONSE==>", RESPTEXT$
                CLEANER$ = USER$ + ": " + RESPTEXT$
                RESPTEXT$ = TEXT$ + CHR$(13) + USER$ + ": " + RESPTEXT$
                GOSUB C100.FILE.EDIT
        ELSE IF UCASE$(RESPOND$) = "N" THEN LOCATE 30, 1
                INPUT "REFRESH SCREEN?(Y/N)", REFRESH$
                IF UCASE$(REFRESH$) = "Y" THEN
                        GOSUB B100.DESIGN
                ELSE
                        END
                END IF
        END IF
RETURN
 
':::::::::::::::::::::::::::::::::::::
':               FILE                :
':::::::::::::::::::::::::::::::::::::
 
C100.FILE.EDIT:
        OPEN FILENAME$ FOR OUTPUT AS #1
        IF LEN(TEXT$) > 60 THEN
               WRITE #1, CLEANER$
               END IF
       WRITE #1, RESPTEXT$
        CLOSE #1
        PLAY "O4 ACE"
 
        GOSUB B100.DESIGN
RETURN
 
C200.FILE.READ:
        OPEN FILENAME$ FOR INPUT AS #1
        INPUT #1, TEXT$
        CLOSE #1
        CLS
        LOCATE 2, 2
        PRINT TEXT$
RETURN
 
 
            
Comments
ghost's avatar
ghost 13 years ago

well done bro…