Capturing text from ext. prog. opened by ShellExec

This is a discussion on Capturing text from ext. prog. opened by ShellExec within the Windows Programming forums, part of the Platform Specific Boards category; Hi, All! Here is my code so far... Code: //--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop //--------------------------------------------------------------------------- #pragma argsused int main(int argc, ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 06: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, 05:21 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 06:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21