I'm having trouble evaluating a variable where part of the name is dynamic. Broken example:
Code
var %test.playcount = 1, %test.pausecount = 2, %test.reccount = 3
var %which = pause
var %output = %test. $+ [ %which ] $+ count

I expected %output to be set to the contents of %test.pausecount ("2") but if I echo %output, I just get "pausecount". I've tried "var %output = % $+ test. $+ %which $+ count" and other variations but have yet to stumble across the secret sauce that gives me the result I'm looking for.

Any help is greatly appreciated!