Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

How to get the text of Netscape

This is a discussion on How to get the text of Netscape within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, Can any body tell me how to gget he text of netscape browser window. I have tried this by ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    How to get the text of Netscape

    Hi,
    Can any body tell me how to gget he text of netscape browser window. I have tried this by using the sendmessag api and passing the WM_GETTEXT message but it did not worked and it did not return the text. The netscape browser window is made of MozillaWindowClass.
    Kuldeep

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Re: How to get the text of Netscape

    function GetNetscapeEditText(wnd: THandle; Param: Integer): Bool; stdcall;
    var
    wndClass: array[0..127] of char;
    f:String;
    begin
    GetClassName(wnd, wndClass, SizeOf(wndClass));
    f:=wndClass;
    // form1.memo1.lines.add(f);
    if wndClass = 'Edit' then
    begin
    SendMessage(wnd, EM_SETSEL, 0, -1); //Select the whole text.
    SendMessage(wnd, WM_COPY, 0, 0); //Copy it to the ClipBoard.
    SendMessage(Param, WM_PASTE, 0, 0); //Paste from the ClipBoard to the Memo1.
    SendMessage(Param, WM_CHAR, 13, 0); //Send ENTER to the Memo1.
    Result := False; //Stop searching.
    end else
    Result := True; //Continue searching.
    end;


    function GetNetscapeAddres(wnd: THandle; Param: Integer): Bool; stdcall;
    var
    wndClass: array[0..127] of char;
    f:String;
    begin

    GetClassName(wnd, wndClass, SizeOf(wndClass)); //Get the object class name.
    f:=wndClass;
    if wndClass = 'MozillaWindowClass' then //Is the desired object?
    begin
    EnumChildWindows(wnd, @GetNetscapeEditText, Param); //Enum the child objects.
    Result := False; //Stop searching.
    end else
    Result := True; //Continue searching.
    end;


    function FindNetscape(wnd: THandle; Param: Integer): Bool; stdcall;
    var
    wndClass,Clas: array[0..127] of char;
    x:Integer;
    NetscapeTitle,f:String;
    begin
    GetClassName(wnd, wndClass, SizeOf(wndClass)); //Get the object class name.
    f:=wndClass;
    if wndClass = 'MozillaWindowClass' then //Is the Internet Explorer main form?
    begin
    EnumChildWindows(wnd, @GetNetscapeAddres, Param); //Enum the child objects.
    GetWindowText(wnd,Clas,SizeOf(wndClass));
    f:=Clas;
    if Pos('Netscape',Clas)>0
    then
    begin
    x:=Pos(' - Netscape',Clas);
    NetscapeTitle:=copy(Clas,1,x-1);
    if NetscapeTitle='' then NetscapeTitle:='No Title';
    form1.Memo1.lines.Add(NetscapeTitle);
    end;
    end;
    Result := True; //Continue searching other IExplorer windows.
    end;

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Re: How to get the text of Netscape

    <a href=> link</a>

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Re: How to get the text of Netscape

    Interesting codes. How do I actually use it?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. text export
    By lnorman in forum Products: Pushpin Tool, Single State Mapper
    Replies: 1
    Last Post: 12-13-2005, 12:29 PM
  2. How to add text to a map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-21-2004, 01:55 PM
  3. TEXT
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 07-12-2004, 04:39 PM
  4. TEXT WITHIN COUNTIES
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-09-2004, 01:54 PM
  5. Text Boxes
    By ClactonEssex in forum Wish List
    Replies: 0
    Last Post: 12-10-2002, 08:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96