Autor Beitrag
Devion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

XP
V7.0
BeitragVerfasst: Sa 04.12.04 19:45 
Hi !

ich arbeite an nem kleinen Speech-Chat (er arbeitet mir dem Microsoft Sam Speech System). Ich arbeite mir TClientsocket und TServerSocket. also wenn ich die funktion alleine aufrufen will dann mach ich das so (ich gib mal nich den ganzen quelltext ein, sondern nur das worauf es ankommt...) :

BEIM CLIENTEN :


Connecten :

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
if ClientSocket1.Active = False then
begin
ClientSocket1.Host := Edit1.Text;
ClientSocket1.Port := 1533;
ClientSocket1.Active := True;
Button1.Caption := 'Trennen';


end
else
begin
ClientSocket1.Active := True;
ClientSocket1.Close;
Button1.Caption := 'Verbinden';

end


Befehl Senden:


ClientSocket1.Socket.SendText('Speech');



BEIM SERVER:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
if MyString = 'Speech' then

oleVoice := CreateOLEObject('SAPI.SpVoice');
oleVoice.Speak('Hello World!', 0);

//usw....



MEINE EIGENDLICHE FRAGE:

wie kann ich das ganze realisieren, dass nicht nur der Befehl gesendet wird, sondern auch der Text aus Edit1 ?
also z.b. so :

ClientSocket1.Socket.SendText('Speech' + Edit1.Text); // GEHT ABER IT !!!!!


und das aller wichtigste :

WIE MUSS DER SERVER DANN DARAUF REAGIEREN ??? :?:

ich hoffe ich konnte es so verständlich wie möglch erklären...

1000000000000000000000 mal Danke für Eure antworten !
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 04.12.04 20:10 
Probiers mal mit

var sendstring: string;
begin
sendstring := 'Speech ' + Edit1.Text;
ClientSocket1.Socket.SendText(sendstring);
end;

falls das immer noch nicht geht probier mal server und client auszutauschen
und dann

ServerSocket.Socket.Connections[0].SendText(sendstring);

wenn ich etwas derartiges code nehme ich eigentlich jedesmal das Chat-Beispiel von Delphi her und bastle es schnell um, dann erspare ich mir ein haufen tipparbeit... mein letztes derartiges Projekt war ein Netcat-Remake mit der Möglichkeit Batchdateien über eine Shell zu schicken...
Devion Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

XP
V7.0
BeitragVerfasst: Sa 04.12.04 22:32 
lol, kann mir keiner antworten ????

is das so schwer ?

bitte bitte bitte antwortet !
Devion Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

XP
V7.0
BeitragVerfasst: Sa 04.12.04 22:34 
Titel: TClientSocket/Server - Befehl senden mit benutzer input ????
bitte um Hilfe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Sa 04.12.04 22:39 
Titel: Tip
Moin!

Hm, klar, keine "Delphi-Hilfe" und auch nix zum selber schrauben, aber:

Kennst du TeamSpeak? Warum das Rad neu erfinden.

cu
Narses
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: So 05.12.04 10:45 
unter den blinden ist der einäugige könig...