From: MikeB on
On May 4, 1:31 pm, MikeB <mpbr...(a)gmail.com> wrote:

> Still working on it, I think there may be something about this in the
> Help. Just trying to decode it.

Hmmm... just tried something and the app just failed (on Vista). I
hate Vista, but I don't have the time/energy to migrate this laptop to
Win 7.

From: Mayayana on
>
I don't get intellisense on the objIE object, whereas with vbsEdit I
do get it.
>

It doesn't work the same way as with vbsEdit.
You open the Auto-Insert settings and enter either
a progID or CLSID. Then assign one or more variables
to the object. It's not as convenient as the approach
where it automatically works when you use CreateObject
(like vbsEdit) but it's more flexible. You can also get
intellisense for non-created objects.

It's all there in the help. WEB-ED is designed to be
customizable, so you really need to look at the various
settings (auto-insert settings, object browser, snippet
library, and general settings).


From: MikeB on
On May 4, 9:53 pm, "Mayayana" <mayay...(a)invalid.nospam> wrote:

>   It's all there in the help. WEB-ED is designed to be
> customizable, so you really need to look at the various
> settings (auto-insert settings, object browser, snippet
> library, and general settings).

I guess you are right. I've spent some time (more time than I usually
would) looking at and reading the help, but I guess I'm in over my
head, since a lot of the terminology doesn't make sense to me.

Thanks anyway.
From: Mayayana on
>
I guess you are right. I've spent some time (more time than I usually
would) looking at and reading the help, but I guess I'm in over my
head, since a lot of the terminology doesn't make sense to me.
>

It's hard to explain how intellisense works.
If you want to fully understand it, look up
dispatch binding (aka late binding) and vtable
binding (aka early binding).

Real intellisense is awkward in script because
it requires reading the type libraries for objects,
but VBS and WSH don't recognize object types.

Intellisense first came out in Visual Studio for
VB. There you reference a type library and declare
object types. Example:

Dim FSO as Scripting.FileSystemObject
Dim oFol as Scripting.Folder

With that information, Visual Studio can provide
intellisense for those object variables, because the
object type tells it what type library it needs to
look in.

With VBS there are no datatypes like that. You
declare something like:

Dim FSO, oFol

If you then type Set oFol = FSO.GetFolder, there's
no way to tell what FSO is or what oFol is, so there's
no way to provide intellisense.

WEB-ED gets around that by requiring that you
assign variable names. It can give you intellisense
for any object because you tell it what the object
is and it then retrieves the type library for that
object. If you assign objIE for InternetExplorer.Application
then you get intellisense every time you type objIE
with a period following. With that method, WEB-ED
can provide intellisense for any object, but you
have to configure it.

The people who wrote vbsEdit have done a beautiful
job with their version of intellisense. vbsEdit can't
provide automatic intellisense for all objects, but it can
give you intellisense for most objects, and it does
so effortlessly.
The way it works is that when you use CreateObject,
vbsEdit retrieves the typelib for that object. It also
tracks function return types. So when you type:

Set FSO = CreateObject("Scripting.FileSystemObject")

it has enough info. to provide intellisense for FSO.
The really clever part is that it also tracks function
return data types. So if you type:

Set oFol = FSO.GetFolder

vbsEdit checks what kind of object is returned by
GetFolder and is able to give you intellisense for the
Folder object as well.

So I guess, to make a long story short, if you want
very good functionality for VBS work with very little
research or effort, vbsEdit is probably worth the $60.
If you're not sure how much scripting you'll be doing
then it might make more sense to just work with a
free editor that provides color syntax highlighting.


From: MikeB on
On May 7, 5:19 pm, "Mayayana" <mayay...(a)invalid.nospam> wrote:

I'm sorry it took me so long to respond, I looked for a reply a day or
so after I posted it and then kind of got caught up in other stuff.

>> I guess you are right. I've spent some time (more time than I usually
>> would) looking at and reading the help, but I guess I'm in over my
>> head, since a lot of the terminology doesn't make sense to me.
>
>
>
>   It's hard to explain how intellisense works.
> If you want to fully understand it, look up
> dispatch binding (aka late binding) and vtable
> binding (aka early binding).
>

I may do this, but I guess I'd rather like to try and finish getting
scripting under my belt, write the code I need and get back to PHP and
web scripting. But thank you for this very detailed explanation. It
is very useful. It might really be helpful if you could show me an
example of the code (or steps) I would have to do to make Web-Ed have
intellisense for the Internetexplorer.application object, or for the
FSO. It seems that you spent more time showing how VbsEdit works than
how to make Web-Ed do the same thing.


>   Real intellisense is awkward in script because
> it requires reading the type libraries for objects,
> but VBS and WSH don't recognize object types.
>
>   Intellisense first came out in Visual Studio for
> VB. There you reference a type library and declare
> object types. Example:
>
> Dim FSO as Scripting.FileSystemObject
> Dim oFol as Scripting.Folder
>
>   With that information, Visual Studio can provide
> intellisense for those object variables, because the
> object type tells it what type library it needs to
> look in.
>
>   With VBS there are no datatypes like that. You
> declare something like:
>
> Dim FSO, oFol
>
> If you then type Set oFol = FSO.GetFolder, there's
> no way to tell what FSO is or what oFol is, so there's
> no way to provide intellisense.
>
>   WEB-ED gets around that by requiring that you
> assign variable names. It can give you intellisense
> for any object because you tell it what the object
> is and it then retrieves the type library for that
> object. If you assign objIE for InternetExplorer.Application
> then you get intellisense every time you type objIE
> with a period following. With that method, WEB-ED
> can provide intellisense for any object, but you
> have to configure it.
>

If, for instance I want InternetExplorer.application , do I have to
code

Dim objIE
Set objIE = WScript.CreateObject("InternetExplorer.Application")

IEobj = objIE

and then if I type

IEobj. (here I get intellisense?)

Do I also have to do something in the Web-Ed settings? I tried doing
something and then Web-Ed crashed.

Then I looked around and I saw that you are reluctant to commit or
provide support for Vista and Win 7 and I figure that it would not
make sense to go any further. It is not as if I'm going to go back to
XP or earlier releases.


>   The people who wrote vbsEdit have done a beautiful
> job with their version of intellisense. vbsEdit can't
> provide automatic intellisense for all objects, but it can
> give you intellisense for most objects, and it does
> so effortlessly.
>   The way it works is that when you use CreateObject,
> vbsEdit retrieves the typelib for that object. It also
> tracks function return types. So when you type:
>
> Set FSO = CreateObject("Scripting.FileSystemObject")
>
> it has enough info. to provide intellisense for FSO.
> The really clever part is that it also tracks function
> return data types. So if you type:
>
> Set oFol = FSO.GetFolder
>
>   vbsEdit checks what kind of object is returned by
> GetFolder and is able to give you intellisense for the
> Folder object as well.
>
>   So I guess, to make a long story short, if you want
> very good functionality for VBS work with very little
> research or effort, vbsEdit is probably worth the $60.
> If you're not sure how much scripting you'll be doing
> then it might make more sense to just work with a
> free editor that provides color syntax highlighting.

And this is exactly my problem, When working with objects, I feel
intellisense helps me to figure out what I can do with each object,
whereas a syntax highlight doesn't help much. Since I won't be doing a
whole lot of scripting, I didn't want to spend $60 - things are a
little tight right now and I would feel it wrong to spend that much
for a single, small project. It would have helped the learning curve,
but I'm just going to have to slog it out.


Thanks for all the time you spent on explaining this.

First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: DeleteFolder access denied
Next: Encrypt files in folder