The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Help needed parsing text in VB Script


  • Subject: RE: Help needed parsing text in VB Script
  • From: "Jim" <jim@xxxxxxxxxxxxxxxxx>
  • Date: Sat, 16 Dec 2006 16:56:59 -0000

Hi Paul,

Array functions are simply aArray(nn), where nn is the element. In your
example aArray(0) will return 1, aArray(1)=6 etc.

Ubound(aArray) will give you the highest numbered element.

I tend to use http://www.devguru.com/ as a good
reference guide, but it's
not a tutorial site.

VBS page is http://www.devguru.com/technologies/vbscript/home.asp


If you need any more tips, e-mail me off-list.



Jim


-----Original Message-----
From: ukha_d@xxxxxxx [mailto:ukha_d@xxxxxxx] On Behalf Of
Paul Gale
Sent: 16 December 2006 13:31
To: ukha_d@xxxxxxx
Subject: RE: [ukha_d] Help needed parsing text in VB Script

Thanks Jim.

Any pointers to web resources that might help me with the array functions?

I really need to learn VB Script - any recommendations to good, easy to
understand books? Are the Dummy's guides any good for this?

Thanks,

Paul.



> -----Original Message-----
> From: ukha_d@xxxxxxx [mailto:ukha_d@xxxxxxx] On Behalf
> Of Jim
> Sent: 16 December 2006 13:15
> To: ukha_d@xxxxxxx
> Subject: RE: [ukha_d] Help needed parsing text in VB Script
>
> You can use the Split function to put them into an array
>
>   aArray = Split(sResponseString, " ")
>
> The second parameter tells Split what the delimiter is, in this case a
> space.
>
> You can then get at each through the array elements (remember the
> first element is zero, not 1).
>
>
>
> Jim
>
>
>
> -----Original Message-----
> From: ukha_d@xxxxxxx [mailto:ukha_d@xxxxxxx] On Behalf
> Of Paul Gale
> Sent: 16 December 2006 12:41
> To: ukha_d@xxxxxxx
> Subject: [ukha_d] Help needed parsing text in VB Script
>
> I'm just trying to setup MainLobby to control an Extron MAV128
> switcher - using the new Generic  Device plugin for MLS.
>
> I need to parse some text in a variable in a VBA (VB Script/WSC)
> window but don't know how to do this.
>
> For example, if I send a status request to the device "V0.",
I get the
> response:
>
> 1 6 1 12 4 5 3 8 Vid 1 6 1 12 4 5 3 8 Aud <CR/LF>
>
> Each of these numbers represents an input assigned to the output in
> the position the number is in i.e. the second digit means input 6 is
> assigned to output 2.
>
> I need to poke each of these values into a variable.
>
> What commands and syntax could I use to do this? Note that the numbers
> could be one or two digits (number 1 to 12) and are separated by a
> space.
>
> Thanks,
>
> Paul.
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ** Sponsored by http://www.BERBLE.com ** all the Cool
Stuff, in one
> Place
>
>
>
>
>
>
>
>
>
> ** Sponsored by http://www.BERBLE.com ** all the Cool
Stuff, in one
> Place
>
>
>
>
>


** Sponsored by http://www.BERBLE.com ** all the Cool
Stuff, in one Place









** Sponsored by http://www.BERBLE.com **
all the Cool Stuff, in one Place



UKHA_D Main Index | UKHA_D Thread Index | UKHA_D Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.