Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

VbScript Editor With Intellisense

0.00/5 (No votes)
13 Aug 2007 4  
VbScript Editor With Intellisense
Screenshot - ScriptEditor.gif

Introduction

Intellisense in scripting languages like VBScript is like a dream for script programmers. The goal of this project is to provide VBScript editor with intellisense like it was available in most of Microsoft language editors. The control uses the type library reference to explore the public methods and functions exposed in any com library. The script developer has to code like VB 6.0 language (Dim pConnection as ADODB.Connection) and the editor will automatically convert the code into VBScript.

The complete VBScript alone with added references can be saved as an XML file. The Script property of control will return the pure VBScript which can be executed using the Microsoft Script Control.

Background

How to run the code:

Open the group project and press F5 vbScriptEditor_Group.vbg.

If the project says missing Edanmo's OLE Interface…. Then add reference to olelib.tlb in TypeLib folder.

Converting Vb 6.0 Syntax to vbscript

Dim pConnection 'As ADODB.Connection 
Dim pRecordset 'As ADODB.Recordset 
Set pConnection = CreateObject("ADODB.Connection") 
pConnection.Open("Query String Here","User ID","Password") 
Set pRecordset = pConnection.Open("SQL Query Here") 
MsgBox(pRecordset.RecordCount) 

Developer continues to code like in VB 6.0 and the editor automatically converts the syntax to VBScript.

For example, the developer codes:

Dim pConnection As ADODB.Connection 

And the editor will convert it to (It will automatically insert ' before As):

Dim pConnection 'As ADODB.Connection 

Which is equivalent to:

Dim pConnection in vbScript

The Script property will return the pure VBScript.

ScriptRTF will return the coloured VBScript.

XMLProject will return the added references in the form of XML.

Make sure to post your comments and ratings for further developments and bug fixing.

History

  • 13th August, 2007: Initial post

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here