Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11914
| From | "Mayayana" <mayayana@invalid.nospam> |
|---|---|
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: Connecting AS400 simulator through vbscript |
| Date | 2018-04-26 07:39 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <pbsdrk$m91$1@dont-email.me> (permalink) |
| References | <f6cc06ea-93a5-4014-b973-62e939cd46e7@googlegroups.com> |
<jassi1100@gmail.com> wrote | autECLs.SetConnectionByHandle (autECLCon(1).Handle) | autECLO.SetConnectionByHandle (autECLCon(1).Handle) | Is Handle a variant or a long? You might want to look at the typelib, assuming VBA provides an object browser. If not, you can find one online. There are two limitations with script. 1) You can't get early binding, which VB/VBA can do by linking to the typelib and then doing like so: Dim autECLCon as PCOMM.autECLConnList If CreateObject works then you should be OK on that score. 2) There are no datatypes except variant. In most cases, to use a COM object, that object has to provide methods that use variants. Sometimes it will work to do something like: autECLs.SetConnectionByHandle CLng(autECLCon(1).Handle) (Your parentheses are not otherwise necessary. You only need them with functions.) In that case VBS seems to be able to pass a Long integer value. But I've only tried it with rare Windows methods. I think BrowseForFolder used to accomodate it. So I don't know for certain that it will work in general. Also, if you have a defined datatype returned by a function then you're out of luck. In that case your only option would be to write a VB DLL to cater to VBS.
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Find similar | Unroll thread
Connecting AS400 simulator through vbscript jassi1100@gmail.com - 2018-04-25 23:28 -0700 Re: Connecting AS400 simulator through vbscript "Mayayana" <mayayana@invalid.nospam> - 2018-04-26 07:39 -0400
csiph-web