Qbasicnews.com

Full Version: Help with FTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm am writing a chat program based on the example given by qb. I want to know if there is a way of checking how long a message is and if it goes over 15 characters then it goes to a file that reads whether it says send c:\blah.blah and it finds the file on local hardrive and then it reads the whole file into one variable and prints the variable. If it goes over 15 characters and dosen't have send as the first 4 cahracters then it saves the file to one that you type. OS you have a prompt that asks you what you want to save the files as.
Code:
INPUT "Message"; message$

IF LEN(message$) > 15 THEN
' write to file, or whatever
END IF

I don't really understand the rest of your question though...
thanx. quote the bits of the message you don't understand and i'll help you out
Geez, who's helping who out here? :wink:
Everything after "checking how long a message is"... try to use fullstops in there this time Wink
rite here goes for a second time

i am writing a chat program like the one called terminal.bas provided by microsoft. I want it to read the line you type and if it is over 15 characters and the first 4 characters are send. Then it reads the rest of the variable which you would have wrote the filename. It opens the filename and then reads the lines of the file into one variable. it then prints them and if the character amount is ove fiteen and the first 4 characters arn't sned then it goes to a filename.

hope that's better
sorry to double post but can i have a sppedy response
Not really better, but do you mean that if a message is over 15 characters it gets split up into multiple lines? So for example:

Code:
Message: this message is longer than 15 characters.

> yadda yadda...

> asdlkjds

> hello world

> this message is
> longer than 15
> characters.

Is that what you want? If it is, then you should have a look in the help for the commands LEN, MID$, LEFT$, RIGHT$ etc. If that ain't what you want, post an example output like my one.
There's a terminal.bas? :o
yes if you hadn't download it. if you want it i'll send you it