INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Use Automation SDK within a Track Info page  (Read 3507 times)

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Use Automation SDK within a Track Info page
« on: August 13, 2003, 11:15:04 pm »

Hi, All.

I want to use CMJAutomation within my HTML Track Info page.  However, I don't think the Track Info plug-in currently exposes the CMJAutomation object to the JScript code within the browser control.

I am thinking of modifying the source code to the Track Info plugin to pass a CMJAutomation object into the CWebBrowser2 control.  Can anyone suggest how to do this.

Perhaps I could call CWebBrowser2::SetProperty("mcc_automation", m_MJDisp);

Then, maybe, my script could read this property somehow?

Or, maybe, I need to set a property in the via HtmlDocument object available by calling CWebBrowser2::get_Document().

I think you can see that I could use a little direction, if anyone has any hints.

Thanks,
Soundman
Logged

DeleteMe

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • nothing more to say...
Re: Use Automation SDK within a Track Info page
« Reply #1 on: August 14, 2003, 04:00:58 pm »

You might not be able to use SetProperty to set a VT_DISPATCH variant type.  I haven't tried it, but check out the documentation below:

http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reference/ifaces/iwebbrowser2/refresh.asp

Is the source for the Track Info Plugin available?
Logged

DeleteMe

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • nothing more to say...
Logged

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: Use Automation SDK within a Track Info page
« Reply #3 on: August 14, 2003, 07:12:47 pm »

Hi, DeleteMe, and thanks for your response.

Yes, the source is available here: http://www.musicex.com/mediacenter/devzone.html

It is the first example listed under Display plug-in SDK heading.  The full source is there.

Can you clarify whether you mean to say that WebBrowser2::PutProperty will not work?

It seems that I can pass it a VT_DISPATCH, but the question is, how an the script inside the html page get ahold of it?

Another idea is to use IActiveScript::GetScriptDispatch to get a dispatch through which I "can invoke script methods or view and modify script variables", according to the msdn documentation for this method.

I would get ahold of the IActiveScript using IWebBrowser2::get_Document() to get ahold of an IHTMLDocument.  Then, use IHTMLDocument::get_Script() to get an IDispatch for the script engine.  Although the msdn document doesn't say this explicitly, I assume this object would have an IActiveScript interface.

Maybe this approach would work, but I am very fuzzy on the details since I don't typically do Windows programming (I am embedded/Linux developer).

Do you think I may be on the right track?
Soundman
Logged

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: Use Automation SDK within a Track Info page
« Reply #4 on: August 24, 2003, 07:58:18 pm »

I got it working!  I have posted my solution as a new topic here:
http://www.musicex.com/cgi-bin/yabb/YaBB.cgi?board=dev;action=display;num=1061783933
Logged
Pages: [1]   Go Up