Computer Science Canada Input and output at same time |
Author: | echeese [ Thu Jan 29, 2004 8:24 pm ] |
Post subject: | Input and output at same time |
I'm trying to finish my chat program, and I need a way to get input without interrupting the chat's output. Can anyone give me an example of a way to put output to the screen and get input at the same time? They must be able to watch the chat happen as they type. |
Author: | shorthair [ Thu Jan 29, 2004 8:32 pm ] |
Post subject: | |
process , one word thats all |
Author: | echeese [ Thu Jan 29, 2004 8:40 pm ] |
Post subject: | |
That doesn't work Can anyone come up with an idea using getch? |
Author: | shorthair [ Thu Jan 29, 2004 8:42 pm ] |
Post subject: | |
it has to work , thats how i did mine , and mine works awsome , let me see some code so i can figure out why it wont work |
Author: | Paul [ Thu Jan 29, 2004 8:42 pm ] |
Post subject: | |
Im curious, how does getch help? doesn't it only take one character at a time? So, if you use it in a chat program and send one character at a time? |
Author: | echeese [ Thu Jan 29, 2004 8:43 pm ] | ||
Post subject: | |||
|
Author: | we64 [ Thu Jan 29, 2004 9:13 pm ] |
Post subject: | |
pretty complicated, I guess it is beyond my knowledge... |
Author: | echeese [ Fri Jan 30, 2004 10:28 am ] |
Post subject: | |
C'mon! Don't tell me it's IMPOSSIBLE! Can someone at least give me an idea? |
Author: | echeese [ Fri Jan 30, 2004 10:49 am ] |
Post subject: | |
Well, I SORTA got it. I opened a new window for input. It's kinda cheap, but hey, it works. If anyone has a better idea, tell me. |
Author: | sport [ Fri Jan 30, 2004 3:38 pm ] |
Post subject: | |
Run the input in one process and output in the other. Process is the only solution and it works!!! |
Author: | Cervantes [ Fri Jan 30, 2004 3:57 pm ] |
Post subject: | |
process will do it... um, just to make certain, you have to use the fork command when you use processes though. Cheers |
Author: | shorthair [ Fri Jan 30, 2004 4:14 pm ] |
Post subject: | |
I said process right from the start , but he didnt want t ohear it , said it didnt work , but i know thats the way to do it |
Author: | Cervantes [ Fri Jan 30, 2004 5:34 pm ] |
Post subject: | |
yeah I know you said that, I was just stating the fact that I agree with you |
Author: | shorthair [ Fri Jan 30, 2004 6:27 pm ] |
Post subject: | |
I wasnt countering Your Comment CErvantes ,sorry it loks like i did , hte comment was for echeese that said it shouldnt be that way , were all right about hte process ,even though they suck its tehe way to go , make a process then open up task manager , your cpu use is 100% always ( well on my apps may be different for someone else) , |
Author: | echeese [ Fri Jan 30, 2004 6:53 pm ] |
Post subject: | |
Ok.. Listen, I used process and I was trying to type a message, and it ended up cut-up all over the place eg Hell[18:52] * Apage43 has left #oot o everyb[18:52] <craig443:#oot> Hey guys ody! |
Author: | shorthair [ Fri Jan 30, 2004 6:56 pm ] |
Post subject: | |
turing messes up messages ,if your goint to do it , you have to learrn to add 10 spaces to the beginning of each message , so it will only cut off spaces , also its been noted that the NET commands are weak ,and were not designed for intense use , edit : I GOT YOUR MESSAGE WRONG , and about that Cervantes is right , but rewmember there is a 255 character limit to a line , turing may be interperating some values or bytes as characters , that couldbe what is splitting the message , or the message could include hidden charaters , i noticed it looks like it sbeing used for IRC , it wouldnt surprise me if there were hidden values and charaacter in the messages |
Author: | Cervantes [ Fri Jan 30, 2004 7:45 pm ] |
Post subject: | |
adding 10 spaces.. in echeese's example all the problem wasn't that characters were missing its that the lines were getting screwed up. I'd suggest playing around with locate and having variables inside the locate that increase with every post. btw, in this are the characters appearing as they are typed, or only when you hit 'enter' i'd assume you're doing it by the characters because I dont think that the lines could get screwed up like that if you used the enter style. if you really want to do it by the characters then you should do like they did in Warcraft II 8) have a box beside each person's name that is used to input the characters that they type. Cheers |