DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Sendkeys to Internet Explorer

  1. #1
    Ivan Guest

    Sendkeys to Internet Explorer


    Hi!!!

    I have written the following codes. I want to send an URL to Internet Explorer
    which is already open. But I don't want to navigate the URL, just display
    it in the address bar. But I always receive error message "invalid procedure
    call".

    Call GetWindowThreadProcessId(IE.hwnd, ProcessID) 'get IE's process id
    AppActivate ProcessID
    SendKeys "%D", True
    Sendkeys "http://www.devx.com", True

    if anyone know how to solve it, please give me response.
    Thank you in advance.

  2. #2
    Eduardo A. Morcillo Guest

    Re: Sendkeys to Internet Explorer

    Try getting the control handle and then set the text using SendMessage with
    WM_SETTEXT.

    --
    Eduardo A. Morcillo
    http://www.domaindlx.com/e_morcillo
    "Ivan" <lwm_ivan@sinaman.com> wrote in message
    news:3ac8187a$1@news.devx.com...
    >
    > Hi!!!
    >
    > I have written the following codes. I want to send an URL to Internet

    Explorer
    > which is already open. But I don't want to navigate the URL, just display
    > it in the address bar. But I always receive error message "invalid

    procedure
    > call".
    >
    > Call GetWindowThreadProcessId(IE.hwnd, ProcessID) 'get IE's process id
    > AppActivate ProcessID
    > SendKeys "%D", True
    > Sendkeys "http://www.devx.com", True
    >
    > if anyone know how to solve it, please give me response.
    > Thank you in advance.




  3. #3
    Eduardo A. Morcillo Guest

    Re: Sendkeys to Internet Explorer

    Try getting the control handle and then set the text using SendMessage with
    WM_SETTEXT.

    --
    Eduardo A. Morcillo
    http://www.domaindlx.com/e_morcillo
    "Ivan" <lwm_ivan@sinaman.com> wrote in message
    news:3ac8187a$1@news.devx.com...
    >
    > Hi!!!
    >
    > I have written the following codes. I want to send an URL to Internet

    Explorer
    > which is already open. But I don't want to navigate the URL, just display
    > it in the address bar. But I always receive error message "invalid

    procedure
    > call".
    >
    > Call GetWindowThreadProcessId(IE.hwnd, ProcessID) 'get IE's process id
    > AppActivate ProcessID
    > SendKeys "%D", True
    > Sendkeys "http://www.devx.com", True
    >
    > if anyone know how to solve it, please give me response.
    > Thank you in advance.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center