Author Topic: How to pass interface to VB Script (or other non-typed languages)  (Read 2295 times)

0 Members and 1 Guest are viewing this topic.

Offline Andrew Peacock

  • Newbie
  • *
  • Posts: 2
Hi,

Is there any way to pass an interface from a PB COM DLL to VBscript? I'm trying to get a reference from the Mini Webbrowser example out of PB, and having problems.

Ideally, i'd like to do something like this in VBScript:

Code: [Select]
hwnd=123456
set obj = CreateObject("PBobj")
iweb2 = objA.getIWebBrowser2(hwnd)
title = iweb2.document.title     ' This is now calling the IHTMLDocument interface via the IWebBrowser2 interface
set obj = Nothing
I can do the hwnd->Iwebbrowser2 mapping, thanks to code you've posted elsewhere, Jose.
But I can't work out how to get the actual interface out to VBScript, in the same way as I would doing this:

Code: [Select]
Set ie = WScript.CreateObject("InternetExplorer.Application")
ie.navigate("http://www.bbc.co.uk")
title = ie.document.title

Any ideas?

Regards,
Andy

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 3126
  • Gender: Male
    • José Roca Software
Re: How to pass interface to VB Script (or other non-typed languages)
« Reply #1 on: March 30, 2011, 03:15:09 PM »
 
Sorry, I can't help you with VBScript. I never have used that language.

Offline Andrew Peacock

  • Newbie
  • *
  • Posts: 2
Re: How to pass interface to VB Script (or other non-typed languages)
« Reply #2 on: March 30, 2011, 10:56:16 PM »
OK Jose, thanks for taking a look and responding, anyway.
Andy