anyone know how to send integers to another computer via bioscom and recieve them on the other computer and execute a piece of code? or even better tell me wots wrong with my code? (i've only included relevant parts of my code not the whole lot....
ok....say i wanted to send a 5 across: heres my code:
that should send the number 5 across if five is pressed on the keyboard rite?
int PumpNo, Key;
outtextxy(85,340, "Select Pump No.(1 to 8):");
then on the other computer i have this piece of code for receiving the five:
ok so the aim of the program is to request a number from the user the take the number and transfer it to the other computer. The number once recieved must make the appropriate green light to flash (basically a button that is drawn on a picture. it flashes fine when i hit a key on the keyboard linked to the computer the program is running on but not when i send the number thru nothing flashes )
void fdp_author (void)
int PumpNo, xt, yt, bx, by, Key;
xt=100, yt=280, bx=130, by=310;
bioscom(2,buffer,10); /*recieveing the five*/
case 2: xt = (xt+50), bx = (bx+50);
case 3: xt = (xt+100), bx = (bx+100);
case 4: xt = (xt+150), bx = (bx+150);
case 5: xt = (xt+200), bx = (bx+200);
case 6: xt = (xt+250), bx = (bx+250);
case 7: xt = (xt+300), bx = (bx+300);
case 8: xt = (xt+350), bx = (bx+350);
Key = getch()-48;
setfillstyle(1,10); /* Create Flashing green light */
}while (Key !=PumpNo);
ok my problem is that the 5 doesnt seem to make anything flash at the other end can someone tell me wots wrong with the program and please help me out? The communication stuff is set up rite its just the sending and receiving stuff thats not going rite!
.......if anyone can help it would be gr8! thanks!!!! happy new yr