Book a Demo

Author Topic: ActiveXObject + JSCript: automation server error  (Read 4903 times)

Kara Melba

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
ActiveXObject + JSCript: automation server error
« on: September 30, 2011, 08:34:49 pm »
Hi,

in my JSCript i need a input box or a file dialog to get a file name.
These statements raise "automation server can't create object" errors:
var vbe = new ActiveXObject("ScriptControl");
var openFileDialog = new ActiveXObject("MsComDlg.CommonDialog");

Reading from File System (with hard coded filename is working fine:
var  objStream     = new ActiveXObject("ADODB.Stream");

So why can't i open a input box? Do you have any ideas?

Thanx a lot!

Nigel Campbell

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: ActiveXObject + JSCript: automation server err
« Reply #1 on: June 06, 2012, 06:51:07 pm »
Similar problem here - MS seem to have deprecated the library with Vista and later versions of Windows.  I'm in the market for a replacement.  Still hunting, though.

rayt

  • EA User
  • **
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: ActiveXObject + JSCript: automation server err
« Reply #2 on: June 06, 2012, 09:21:10 pm »
There is a function in the Repository object that displays a file dialog and returns the file path string

Repository.InvokeFileDialog (string FilterString, long Filterindex, long Flags)

Ray
« Last Edit: June 06, 2012, 09:21:29 pm by rayt »