I wish to use the /LIST command in a script and capture the channels list for my own purposes. Easy enough to do in script. The issue I have is that the "Channels List" window is still created and I also get a beep even though I have captured numerics 321, 322 and 323 and issued a halt.

Can anyone give me a hint. (I've probably missed something obvious.)

Sample code:

Code
; start of list channels
raw 321:*: {
  halt
}

; channel name 
raw 322:*: {
  echo -a $2
  halt
}

; end of list channels
raw 323:*: {
  halt
}