Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IntelliSense in MS Development Environment

Status
Not open for further replies.

jackha18

Technical User
Sep 28, 2002
39
IL
I'm trying to use MS Development Environment (mse.exe) to edit VBS files. Is there any way to declare an object variable so that it's members will be listed in the Members List drop-down box (IntelliSense)?
I tryed to declare it with

Dim objWord as new Word.Application
Set objWord=CreateObject("Word.Application")

Even after I inserted Word COM into libraries of Object Browser it didn't help. The class itself is shown in the Object Browser but I just can't get the list of its members in the code window! What's wrong ?
 
One item to look at is:


This says with a reg hack you can get MSE to more easily open VBS, JS, and "WSH" (I think they meant to say WSF). Something similar can be done for HTA files too I think.

But MSE needs a <script> tag to provide color-coding of script language keywords.

The object models supported for IntelliSense include IE 4.x+ and ASP (2.0?) but service packs may have updated these to newer versions. To get IntelliSense for individual objects though you'd need to add some sort of object reference to a project in MSE. I'll look some more, maybe this can be done, maybe not.
 
I tried the reg hack already. The problem, I guess, is that all the variables in VBS are variant so
there is no way to declare variable of Word or Excel type. Then how the IDE could know what kind of object is this? I'm quite a newbie for VBS and it seems like a dead lock to me. Unless there IS some way to declare COM objects before using them. Is there?
 
Well, you can do that (declare objects) to an extent by using the <object> tag in a .wsf file for WSH or in an HML or HTA page. Problem is, the MSE IDE doesn't pick all of these up, especially in a .wsf file. Even then when you create an object reference on the fly by something like CreateObject( ) or by capturing a reference as in
Code:
Set objVar = objOther.objValuedProp
the IDE would need to track that and I'm not sure MSE will.

As I said, it &quot;knows&quot; the browser object model so script in an HTM or HTA file will get IntelliSense for browser DOM items, and it knows the ASP objects like Session, Request, and so on. Aside from that I don't think you can expect much in the way of IntelliSense support in MSE.

Some 3rd party script editors try to fill this gap. I assume PrimalScript does, and WEB-ED seems to as well. These all cost $$.

I write mostly HTM, HTA, and WSF scripts myself. So when I use MSE or Visual InterDev for these I gain a little bit at least:

* Color-coding script code.
* Handy Object Browser to look up those pesky methods and properties.
* Basic online help for script syntax (supplemented by the WSH 5.6 help).
* Design and QuickView panes for the &quot;webbish&quot; stuff (though useless for .wsf files).
* IntelliSense for DOM elements.

All of these taken together offer a lot over hacking in NotePad, but I'm not above that either. ;-)

Another &quot;free&quot; script editor is actually good old Script Debugger. It fits someplace between NotePad and MSE as an editor but also is more HTML-oriented than script-oriented, strangely enough.

I know lots of people swear by PrimalScript. I'm too cheap though.
 
well, it's seems really strange to me there's no simple script editor with intellisense. i spent a lot of time recently looking for something like this on the web. i guess i'll try primalscript - it's being referenced to in too many places.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top