Get text from a site then post automaticly in Paltalk

In this forums, you can get help for any programming language.

Get text from a site then post automaticly in Paltalk

Postby Kye » Thu Jan 25, 2007 10:50 am


Hi guys,

News bot.

Trying to display some text from a site into paltalk automaticly, I can get the site to come up in the form but cant get it to paste it self automaticly into a paltalk room I'd love some help with this, you guy know what you are doing in VB more then I do, Im sure Im not the only one that wants this kind of form for paltalk .

Thaks in advance
Kye
 
Posts: 4
Joined: Thu Jan 25, 2007 10:44 am
Location: Australia

Postby Ghost » Sat Jan 27, 2007 3:02 pm

Is your program already pulling the text from the site?
Ghost
 

Postby BattleStar-Galactica » Sat Jan 27, 2007 4:09 pm

use webrowser the get the text into your programm

or maybe a vb6 guru can convert this code to get text from internet explorer


Code: Select all
CoInitialize(NULL);
      HINSTANCE hInst = ::LoadLibrary( _T("OLEACC.DLL") );
      string strTemp;
      CComPtr<IHTMLDocument2> spDoc;         
      LRESULT lRes;
   
      strTemp="";
      UINT nMsg = ::RegisterWindowMessage( _T("WM_HTML_GETOBJECT") );
      ::SendMessageTimeout( hwnd, nMsg, 0L, 0L, SMTO_ABORTIFHUNG, 1000, (DWORD*)&lRes );

      LPFNOBJECTFROMLRESULT pfObjectFromLresult = (LPFNOBJECTFROMLRESULT)::GetProcAddress( hInst, _T("ObjectFromLresult") );
      if ( pfObjectFromLresult != NULL )
      {
         HRESULT hr;
         hr = (*pfObjectFromLresult)( lRes, IID_IHTMLDocument2, 0, (void**)&spDoc );
         if ( SUCCEEDED(hr) )
         {
            CComPtr<IHTMLElement> pHTMLElement;
            hr=spDoc->get_body(&pHTMLElement);
            BSTR bstrText;
            pHTMLElement->get_innerText(&bstrText);
            strTemp=(char *)_bstr_t(bstrText);
               
         ///strTemp.c_str();
                        //strTemp.c_str()= the text we want to get
            
         }
      }
      ::FreeLibrary( hInst );


this code get internet explorer text and can be use to get yahoo text if I get paid I will convert to vb6 :lol: [/code]
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby Newbie » Sat Jan 27, 2007 8:36 pm

tra tui 10$ di tui convert wa VB6 cho
User avatar
Newbie
imFiles Junior
imFiles Junior
 
Posts: 95
Joined: Fri Oct 07, 2005 2:51 pm

Postby BattleStar-Galactica » Sun Jan 28, 2007 2:01 am

Newbie wrote:tra tui 10$ di tui convert wa VB6 cho


ong di keu nho queen show zu' di, convert cai dau ong thi duoc
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Posting text from a site automaticly

Postby Kye » Mon Jan 29, 2007 1:08 pm

As I said in my first post I can get the text from a site and display it in VB already the problem is that I cant get it to automaticly at intervals paste its self into a paltalk room.

What a great project for locohacker Im sure there are a heap of room owners wanting something like this.
Kye
 
Posts: 4
Joined: Thu Jan 25, 2007 10:44 am
Location: Australia

Postby Ghost » Mon Jan 29, 2007 2:15 pm

Just... throw it on a timer? You do have to code for sending text to Paltalk, right?
Ghost
 

Postby autopilot » Mon Jan 29, 2007 11:01 pm

another way to do it, is make the object that is recieving data from the webpage have events and then use the .changed (at least this works in vb2005) to trigger the send to pal room.

autopilot
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm

Postby Kye » Tue Jan 30, 2007 7:47 am

Thanks for the input guys,

I put in the timer and its sending to the room apart from one small problem its just pasting the words "Microsoft Web Browser Control" into the room, looks like its not reading the page properly, any suggestions?

Thanks
Kye
 
Posts: 4
Joined: Thu Jan 25, 2007 10:44 am
Location: Australia

Postby autopilot » Wed Jan 31, 2007 9:42 pm

Kye you say that you can read the website and display it in your form... what kind of control are you using to display it? if it is a browser control, you will have to pull the text out of the browser to post into the text of the room. Without seeing how you are trying to do this, it is imposible to say what you need to do to fix it. look into the html innertext. That might be the best way to convert it to text.
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm

Postby Kye » Thu Feb 01, 2007 3:46 am

Thanks Auto pilot Im just using the standard web browser control component in VB6 the innertext one should do the trick I'll start playing with it thanks for the help, I'll let you know if I run into any more problems.
Kye
 
Posts: 4
Joined: Thu Jan 25, 2007 10:44 am
Location: Australia

Postby Departure » Thu Feb 01, 2007 9:30 am

autopilot wrote:Kye you say that you can read the website and display it in your form... what kind of control are you using to display it? if it is a browser control, you will have to pull the text out of the browser to post into the text of the room. Without seeing how you are trying to do this, it is imposible to say what you need to do to fix it. look into the html innertext. That might be the best way to convert it to text.


BINGO atleast someone has some sence, I was going to write the same thing the otherday but really could'nt have been fucked to do so...


What you need to to do is get the website source then strip out all the html tags then you can post it to the room...

Ofcause it goes into much more, but let me see if i can find my Paltalk profiler program i made about 2 years ago, that program stripped out the html tags and also uses the html tags as reffrences, in your case you could use the html tags as a refferenc for updated news

if i do find it ill pm it to you ...
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia


Return to Programming Help

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

cron