Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #12431
| Path | csiph.com!news.mixmin.net!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail |
|---|---|
| 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 | Wed, 9 Mar 2022 10:39:06 +0100 |
| Organization | Aioe.org NNTP Server |
| Lines | 33 |
| Message-ID | <t09sli$pfb$1@gioia.aioe.org> (permalink) |
| References | <7ikpiwc1wlb3.1jl0fbkule7nk$.dlg@40tude.net> <t07aqg$1ipv$2@gioia.aioe.org> <t07kg2$2b4$1@dont-email.me> <t08dhn$30u$1@gioia.aioe.org> <16hdz1wr1j330.sbmmjvqqgesy$.dlg@40tude.net> |
| Injection-Info | gioia.aioe.org; logging-data="26091"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; |
| X-RFC2646 | Format=Flowed; Original |
| X-Priority | 3 |
| X-Notice | Filtered by postfilter v. 0.9.2 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.5512 |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5512 |
| X-MSMail-Priority | Normal |
| Xref | csiph.com microsoft.public.scripting.vbscript:12431 |
Show key headers only | View raw
JJ, > Hold on there, I didn't know that VB can convert Byte() to a string. As far as I can tell, it stil doesn't. But for some reason wscript.echo accepts a Byte-array too. > But since MID() only accept a string, I'm not sure I understood you right, as you posted three lines you said work, but than follow it with the above ... Yes, a quick test shows that MID() indeed does work, but - unexpectedly - grabs two bytes at a time. > Instead, we use RIGHT(), which unexpectedly, works. :-) Currently the only unexpected thing with MID() and RIGHT() is that, and /how/ they work on a Byte() array. Ofcourse, it didn't help that you need an ASCW() (instead of just an ASC() ) to see the actual bytes. > So, thank you for mentioning MID(). You're welcome. I'm just glad that my fumbling lead to something usefull. But forgive me if I say that I probably won't ever try to use that "adodb.stream" object in VBScript for anything. The above juggeling brings back memories of how to do string stuff in DOS Batch files. :-| 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