Results 1 to 3 of 3

Thread: Automation error when calling ExecScript

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    4

    Red face Automation error when calling ExecScript

    Hi All,

    Can anybody help me??

    I am calling a Javascript code from within VB application, with the help of ExecScript method. The problem is that, if I am using only some alert() statements in the javascript's code, then it runs fine. But as soon as I use window.event.clientX or window.images[0].style or some javascript objects in Javascript code, there is a run time error : Automation Error (-2147417843).

    I dont know what mistake I am doing. I am doing web programming first time through VB. When I test this Javascript code in an HTML file, then it is running fine. But when I call this JS code from within VB, then there is this error.

    Please help me in solving this problem.

    Thanks in advance.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Automation error when calling ExecScript

    What version of VB are you using?

    Post the code that is causing the error.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    4

    Re: Automation error when calling ExecScript

    Hi,
    I am using VB 6.0 Enterprise Edition. You can find the code in zip file. In this code, I am using text file "One.Txt" which contains an alert() statement. In this case code runs fine. But if I use anoter text file "Two.Txt" which contains a window.event.clientX statement, then Automation error generates. Right now, I have commented out that statement which is generating error.

    The working of program is : run the program, and then start Internet Explorer, Open any web page. As soon as your mouse pointer is hovering over the web page, the javascript code is executed.

    Thanks & Regards
    Attached Files Attached Files

Posting Permissions

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



Click Here to Expand Forum to Full Width