#196572 - 2009-11-03 11:19 PM
Re: Having trouble with 2 dim type of array? parallel type?
[Re: itdaddy]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4567
Loc: USA
|
Your question is confusing so if this is not what you want, can you rephrase it?
This is using two different arrays.
$ips="1.1.1.1","2.2.2.2","3.3.3.3"
$macs="abcde","efghi","jklmn"
for $i=0 to ubound($ips)
? $ips[$i]
? $macs[$i]
next
You could also use a multidimensional array, but I think the method above is easier.
|
|
Top
|
|
|
|
#196574 - 2009-11-04 08:58 AM
Re: Having trouble with 2 dim type of array? parallel type?
[Re: itdaddy]
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
For your application you don't actually need two arrays at all.
$IPMAC_8TH="192.168.2.85 0021851165F4",
"192.168.2.92 002144CB2F43",
"192.168.2.168 002168D92EA8"
For Each $IPMAC in $IPMAC_8th
Shell "cmd.exe /c wol.exe "+$IPMAC
Next
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 611 anonymous users online.
|
|
|