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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Environment for VBscripts

Status
Not open for further replies.

stesvet1

Technical User
Sep 23, 2006
22
I am able to write simple macros in Outlook or Word.

In order to improve my skills I have installed MS VB 2005 Express edition. But it is terrible environment, because I do not know where I can write VB scripts! And my son also said that it is too complicated and very time wasted (you are under computer control not that you control the computer).

Although I was able in this environment create complicated menu for html-links I was not able to solve 1+1=2 or string A + string B = string C.

Is any VB environment where an individual can write scripts for personal purposes at his home PC? But any any any visual application with objects like boxes, text fields, stars, cars, bubles, .....
 
You will need an IDE like VB 2005 Express if you plan on developing applications. However, VBscript is easier and simpler (from an IDE standpoint) if your goal is to write task oriented programs.

My recommendation is:
Notepad (or some thing of the like). VBscript is native to MS Windows 2000 and up. Simply write a script in notepad, save it as a .vbs file, and run it by double-clicking.

Excellent VB reference.

-Geates
 
>VB 2005 Express

has nothing to do with VBScript, I'm afraid.

As Geates says, typically you would be expected to edit VBScript in a simple text editor. However I'd advise a 3rd party tool. I've been using Notepad++ for a while, which is pretty good for a free alternative to (and does rather a lot more with VBScript than) Notepad. More recently I've looked at VbsEdit, which I'm rather taken by
 
If you're using XP you can also use the Microsoft Script Editor to debug your VBScript files (step through the code, check out variables values etc).

It's not so good as a stand alone script editor though.

You can access it from the commandline:
Code:
WScript.exe "path to your script" //D
or you can (as I prefer) add an entry to your context menu for .vbs files (HKLM/VBSFile/Shell/Open With Debugger/Command default key with a value of WScript.exe "%1" //D).

Careful if you do edit the registry though. Back it up first.

Hope this helps

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post
 
Grr, tried to download VbsEdit to have alook at it and it's blocked at work. Fan-flippin'-tastic! [banghead]

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post
 
>If you're using XP you can also use the Microsoft Script Editor to debug your VBScript files (step through the code, check out variables values etc).

No, you can't. Or, at least, I'd be surprised ...

1) MSE doesn't come with the OS. It ships with Office*
2) MSE cannot step through code without the Microsoft Script Debugger (or another script debugger service such as you might get with Visual Studio 6 or VS.NET). VBSedit suffers from a similar proviso

* And even then requires an Office application to work as a host. In Office 2007, MSE is still shipped but is not hosted by any of the applications, so it is just a vaguely pretty and vaguely intelligent script editor

>You can access it from the commandline:

That //D starts the debugger (as the registry key hints ...), not MSE. Again, it not always the case that the debugger is installed or, if installed, that it is active ...
 
I use Notepad2 for the syntax highlighting.

Just tried VBSEdit. I love the object reference and sub/function quicklinks in the right pane.

-Geates
 
strongm,

1) Yes, you are right there to a degree (it also ships with the .NET DTE I believe)
2) Also correct (I think, you'll see what I mean later).

If you access it via the context menu hack it doesn't require an office application to act as a host. It will however require a version of VS2003+ (see 1)

Using the context menu is a bit of a fudge though really, it'll bring up the JIT debugger (assuming that is your current debugger, see point 2), from which you can tell it to allow you to debug it in MSE.

After a bit of looking at what I had posted I realise that my original post was a misleading as to what was required to run it (although it should all be included in the express edition that the OP has I think) but was correct, as I'm doing it now. [wink]

You were however, 100% right about the command line, that was my mistake after looking at my reg entry and assuming...[blush]



HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post
 
strongm said:
VBSedit suffers from a similar proviso
I've just tried stepping through the evaluation copy of it after asking systems nicely to unblock the site (proper channels and all [wink]). That is painful [banghead] (though I'm aware it won't be like that if I pay for it.

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post
 
>it also ships with the .NET DTE

I'm pretty certain it doesn't. Office applications only (although that does include applications that some may not be aware were Office applications; it shipped with FrontPage for example)

And the Express versions of Visual Studio and it's components do not have the JIT debugger ...
 
I'll stand corrected there Mr Strong (on both points) [blush]

I can still use it as a working debugger on my machine though [wink]

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post
 
I think where I'd got my wires in a tangle is that it seemed to be part of Microsoft Development Environment 7.0 (or at least mine is) and that seemed to be part of Microsoft Visual Studio 2003 and version 1.1 of the framework.

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post
 
Thank you for interesting discussion and the recomandations
Stefan
 
Or you could make your own IDE. I posted a trivial one at ScriptDev - Simple WSH IDE with the source and a precompiled binary for XP or later. It isn't fancy but you can always add any features you really need yourself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top