how to send text to beyluxe

You can talk about VB programming here

how to send text to beyluxe

Postby CyclopZ » Sun May 02, 2010 1:57 am


hello 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
CyclopZ
imFiles Newbie
imFiles Newbie
 
Posts: 8
Joined: Mon Sep 14, 2009 11:05 am

Re: how to send text to beyluxe

Postby Departure » Sun May 02, 2010 9:13 am

I 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
Code: Select all
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;

User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Re: how to send text to beyluxe

Postby CyclopZ » Mon May 03, 2010 3:59 am

Hi 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
CyclopZ
imFiles Newbie
imFiles Newbie
 
Posts: 8
Joined: Mon Sep 14, 2009 11:05 am

Re: how to send text to beyluxe

Postby CyclopZ » Tue May 04, 2010 7:44 am

Hi 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
CyclopZ
imFiles Newbie
imFiles Newbie
 
Posts: 8
Joined: Mon Sep 14, 2009 11:05 am


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests