- This topic has 3 replies, 2 voices, and was last updated 12 years ago by
Departure.
-
AuthorPosts
-
May 2, 2010 at 6:57 am #187227
CyclopZ
Memberhello departure
Pls help me…i need to send a line of text to active beyluxe room.
There is a textbox say text1.text and send button.Once we press the send button the text
should automatically send to the room with our nick as we see in auto greeter.i made a small application in vb and i am not sound in it. So dont know to code this part.
This application should connect to the active room.i have seen your auto greeter for beyluxe. So for you this will be a piece of cake
hope you will help me…please do help.
Thanks in advance
May 2, 2010 at 2:13 pm #187230Departure
MemberI dont write in vb anymore so here is delphi code, it taken out of my beyluxe class but you can work out what you need to do
procedure TBeyluxe.SendTxtBeyluxe(RichEditTxt: TRichEdit);
var
memStream: TMemoryStream;
strList: TStringList;
sText: String;
start_pos,end_pos,txt_len: integer;
begin
if RmRichTxtHwnd 0 then
begin
memStream := TMemoryStream.Create;
strList := TStringList.Create;
try
RichEditTxt.Lines.SaveToStream( memStream );
memStream.Position := 0;
strList.LoadFromStream( memStream );
sText:= strList.GetText;
txt_len:= SendMessage(RmRichTxtHwnd, WM_GETTEXTLENGTH, 0, 0);
If txt_len > 0 Then
begin
SendMessage(RmRichTxtHwnd, EM_GETSEL, start_pos, end_pos);
SendMessage(RmRichTxtHwnd, EM_SETSEL, 0, txt_len);
SendMessage(RmRichTxtHwnd, WM_CUT, 0, 0);
SendMessage(RmRichTxtHwnd,WM_SETTEXT,Length(sText),Integer(PChar(sText)));
PostMessage(RmRichTxtHwnd, WM_KEYDOWN, VK_RETURN,0);
PostMessage(RmRichTxtHwnd, WM_KEYUP, VK_RETURN,0);
Sleep(100);
SendMessage(RmRichTxtHwnd, WM_PASTE, 0, 0);
SendMessage(RmRichTxtHwnd, EM_SETSEL, txt_len, txt_len);
end
else
begin
SendMessage(RmRichTxtHwnd,WM_SETTEXT,Length(sText),Integer(PChar(sText)));
PostMessage(RmRichTxtHwnd, WM_KEYDOWN, VK_RETURN,0);
PostMessage(RmRichTxtHwnd, WM_KEYUP, VK_RETURN,0);
end
finally
memStream.Free;
strList.Free;
end;
end;
counter:= 0;
end;
May 3, 2010 at 8:59 am #187229CyclopZ
MemberHi Departure
Thanks for replying.
I haven’t seen this delphi language.Does it have interface like what we have in VB?
If so, in the send command button i mentioned earlier,can i paste the code you given to send the text to room in beyluxe?
Thanks
May 4, 2010 at 12:44 pm #187228CyclopZ
MemberHi Departure
Could you provide the full source code in delphi of beyluxe auto greeter or any other softwares which can send text messages to the active room in beyluxe.
Thanks in Advance
-
AuthorPosts
- You must be logged in to reply to this topic.