Thread: Capturing text from ext. prog. opened by ShellExec

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    1

    Capturing text from ext. prog. opened by ShellExec

    Hi, All!

    Here is my code so far...
    Code:
    //--------------------------------------------------------------------------- 
    
    #include <vcl.h> 
    #pragma hdrstop 
    
    //--------------------------------------------------------------------------- 
    
    #pragma argsused 
    int main(int argc, char* argv[]) 
    { 
    
           AnsiString Url = 
    
                     "http://www.ehymns.com/test.html?from=home&page=2132findzip&address1=" + 
                     (AnsiString) argv[1] + "&zip=" + argv[2]; 
    
                     //ShowMessage( Url ); 
    
                     ShellExecute ( NULL, "open", "C:\\iexplore.exe", Url.c_str(), NULL, SW_SHOW ); 
    
          return 0; 
    
    }
    I would like to somehow get into the browser window and import the HTML source into an AnsiString (or other) variable so that I can parse out the text and return the extended address' zip4 info as an integer back from the program.

    Thanks!
    Bud

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    You probably want to use some API (M$ has an API for everything) which just does an HTTP fetch of some description.

    Hopefully a real M$ programmer will be along shortly to tell you which one to use, if you haven't gone and found it already.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. mygets
    By Dave_Sinkula in forum C Programming
    Replies: 6
    Last Post: 03-23-2003, 07:23 PM
  2. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM
  3. Accessing a Specific Text Line Inside CEditView :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2002, 08:12 PM
  4. Validating the contents of a char buffer
    By mattz in forum C Programming
    Replies: 3
    Last Post: 12-09-2001, 06:21 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM