4

Is there a JScript IDE with autocomplete for COM objects created with ActiveXObject() function?

i.e. so that after typing the following piece of code the IDE would display the list of methods / properties of the ExcelApp object:

var ExcelApp = new ActiveXObject("Excel.Application");
ExcelApp.

The only thing I've found was JsEdit, but I guess it got discontinued some time ago. I've also tested Visual Studio and JetBrains Webstorm, but couldn't make the autocomplete functionality to work.

colemik
  • 1,417
  • 2
  • 20
  • 24

3 Answers3

2

(Disclaimer: I am the author of the project in question.)

I use ts-activex-gen to generate the Typescript definition files for a given ActiveX library, and any Typescript-supporting editor (I use Visual Studio Community with the Typescript plugin).

You won't be able to write Typescript directly in your .wsf or .hta, but you can use script tags to reference the outputted Javascript files.


In Visual Studio Code, setting allowJs to true within tsconfig.json will display Intellisense based on Typescript definition files not only while editing Typescript, but even while editing plain Javascript files.

Zev Spitz
  • 13,950
  • 6
  • 64
  • 136
1

The only way I've gotten around this is to make my own wrapper for the methods most commonly used. I'm on Visual Studio 2012. I include all of the js files as script tags in my wsf file, and then the intellisense in Visual Studio picks them up.

o.carltonne
  • 365
  • 1
  • 3
  • 13
1

I've found that SAPIEN's PrimalScript does this.

Note that you if your Excel app is 32bit, you'll need the 32-bit version of the application (unfortunately I don't have the 32-bit version of PrimalScript installed at the moment to show you).

From https://www.sapien.com/forums/viewtopic.php?t=9421#p51078

enter image description here

Please note that the 64 bit version of PrimalScript cannot see 32 bit COM objects and vice versa. The above screenshot was created on Windows 7 with the 32 bit version of PrimalScript 2015 and Office 2010 32 Bit.

The quote shows the behavior for VBScript, but the output should be basically identical for JScript.

Community
  • 1
  • 1
YenForYang
  • 2,998
  • 25
  • 22