我现在正在使用 vbscript 测试宽带通信前端芯片内的接收器。例如,下面的代码:
Dim target : target = chip
target.receiver1.value = 1 'a simple assignment operation
...
我还想对象化receiver1,使代码看起来像下面的形式:
Dim target : target = chip
Dim targetReceiver : targetReceiver = receiver1
target.targetReceiver.value = 1
...
在这里,我可以轻松地将接收器目标修改为例如“ receiver2
”或“ receiverN
”,而无需手动更改行target.receiver1.value = 1
。我知道上面的代码不起作用,但是鉴于我想要实现的目标,你能告诉我怎么做吗?