Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #12426
| From | "R.Wieser" <address@not.available> |
|---|---|
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: Access the 3rd and rest elements of a Byte() (byte array)? |
| Date | 2022-03-08 21:15 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <t08dhn$30u$1@gioia.aioe.org> (permalink) |
| References | <7ikpiwc1wlb3.1jl0fbkule7nk$.dlg@40tude.net> <t07aqg$1ipv$2@gioia.aioe.org> <t07kg2$2b4$1@dont-email.me> |
Mayayana, > I don't think it's possible with straight VBS because > it's looking for a variant. Yes, and no*. But I am afraid I was a bit to quick with my reply, making assumptions I should not have. "mid(...)" doesn't work. JJ, my apologies. * JJ mentioned that both "asc()" and "ascw()" work. I just found that "wscript.echo" also works - though it will try to interpret each two bytes as a single wide-character symbol. In my case got 13 question-marks. Alternating the written chars with a bunch of "chr(0)"-s causes the "abc"... string to be displayed. > It's datatype byte array. You can't convert it. You can't get to it > as x(0). Because it's not a variant. I agree that thats pretty-much it. But you know, its a bit funny : I've written a few OCX objects with methods which do not accept variants at all (just DWORD integers / floats and BStrings), and I can use them in VBS without a problem. IOW, VBS does a lot of conversion below the surface. Just not here. > Long story short, VBS is the wrong tool. :-) Straight-up VBS isn't really usable for much anything. The very moment you want to actually /do/ something with it you need to load external objects. Most often starting with the filesystem one. Regards, Rudy Wieser
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar
Access the 3rd and rest elements of a Byte() (byte array)? JJ <jj4public@gmail.com> - 2022-03-08 06:24 +0700
Re: Access the 3rd and rest elements of a Byte() (byte array)? "R.Wieser" <address@not.available> - 2022-03-08 11:22 +0100
Re: Access the 3rd and rest elements of a Byte() (byte array)? "Mayayana" <mayayana@invalid.nospam> - 2022-03-08 08:07 -0500
Re: Access the 3rd and rest elements of a Byte() (byte array)? "R.Wieser" <address@not.available> - 2022-03-08 21:15 +0100
Re: Access the 3rd and rest elements of a Byte() (byte array)? "Mayayana" <mayayana@invalid.nospam> - 2022-03-08 16:57 -0500
Re: Access the 3rd and rest elements of a Byte() (byte array)? JJ <jj4public@gmail.com> - 2022-03-09 10:58 +0700
Re: Access the 3rd and rest elements of a Byte() (byte array)? "R.Wieser" <address@not.available> - 2022-03-09 10:39 +0100
Re: Access the 3rd and rest elements of a Byte() (byte array)? Ulrich Möller <knobbi38@arcor.de> - 2022-03-11 11:23 +0100
Re: Access the 3rd and rest elements of a Byte() (byte array)? "R.Wieser" <address@not.available> - 2022-03-11 13:14 +0100
Re: Access the 3rd and rest elements of a Byte() (byte array)? "Mayayana" <mayayana@invalid.nospam> - 2022-03-11 09:12 -0500
Re: Access the 3rd and rest elements of a Byte() (byte array)? Ulrich Möller <knobbi38@arcor.de> - 2022-03-11 18:41 +0100
Re: Access the 3rd and rest elements of a Byte() (byte array)? "Mayayana" <mayayana@invalid.nospam> - 2022-03-11 15:58 -0500
Re: Access the 3rd and rest elements of a Byte() (byte array)? JJ <jj4public@gmail.com> - 2022-03-12 06:24 +0700
Re: Access the 3rd and rest elements of a Byte() (byte array)? "Mayayana" <mayayana@invalid.nospam> - 2022-03-11 19:30 -0500
csiph-web